Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
backspace committed Dec 10, 2024
1 parent d1b978d commit 97de329
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/experiments-realm/app-card.gts
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ class DefaultTabTemplate extends GlimmerComponent<DefaultTabSignature> {
? {
...doc,
meta: {
...doc.meta,
...doc.data.meta,
realmURL: this.args.currentRealm,
},
}
Expand Down
6 changes: 3 additions & 3 deletions packages/experiments-realm/components/layout.gts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export const setBackgroundImage = (

interface TitleGroupSignature {
Args: {
title: string;
tagline: string;
thumbnailURL: string;
title?: string;
tagline?: string;
thumbnailURL?: string;
element?: keyof HTMLElementTagNameMap;
};
Element: HTMLElement;
Expand Down
11 changes: 6 additions & 5 deletions packages/experiments-realm/crm-app.gts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class CrmAppTemplate extends Component<typeof AppCard> {
this.activeFilter = filter;
}
//tabs
@tracked activeTabId: string = this.args.model.tabs[0].tabId;
@tracked activeTabId: string | undefined = this.args.model.tabs?.[0]?.tabId;
@tracked tabs = this.args.model.tabs;
@tracked private selectedView: ViewOption = 'card';
@tracked private searchKey = '';
Expand All @@ -118,7 +118,7 @@ class CrmAppTemplate extends Component<typeof AppCard> {
attributes: { displayName: string; total: number };
}[];

for (let tab of this.tabs) {
for (let tab of this.tabs ?? []) {
let filters = this.filterMap.get(tab.tabId);
if (filters) {
for (let filter of filters) {
Expand All @@ -142,11 +142,11 @@ class CrmAppTemplate extends Component<typeof AppCard> {
});

get filters() {
return this.filterMap.get(this.activeTabId)!;
return this.filterMap.get(this.activeTabId!)!;
}

@action setActiveFilter() {
this.activeFilter = this.filterMap.get(this.activeTabId)![0];
this.activeFilter = this.filterMap.get(this.activeTabId!)![0];
}

//Tabs
Expand All @@ -163,7 +163,8 @@ class CrmAppTemplate extends Component<typeof AppCard> {
}
get activeTab() {
return (
this.tabs.find((t: Tab) => t.tabId === this.activeTabId) ?? this.tabs[0]
this.tabs?.find((t: Tab) => t.tabId === this.activeTabId) ??
this.tabs?.[0]
);
}

Expand Down

0 comments on commit 97de329

Please sign in to comment.