Skip to content

Commit 4539589

Browse files
committed
add import-chrome-component.ts to working tree
1 parent aa42630 commit 4539589

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

libs/importer/src/components/chrome/import-chrome.component.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,17 @@ export class ImportChromeComponent implements OnInit, OnDestroy {
112112
private i18nService: I18nService,
113113
) {
114114
effect(async () => {
115-
this.profileList = await this.onLoadProfilesFromBrowser(this.getBrowserName(this.format()));
116-
// FIXME: Add error handling and display when profiles could not be loaded/retrieved
115+
// Callback is set via @Input after constructor, so check it exists
116+
if (this.onLoadProfilesFromBrowser) {
117+
try {
118+
this.profileList = await this.onLoadProfilesFromBrowser(
119+
this.getBrowserName(this.format()),
120+
);
121+
} catch (error) {
122+
this.logService.error("Error loading profiles from browser:", error);
123+
// FIXME: Add error handling and display when profiles could not be loaded/retrieved
124+
}
125+
}
117126
});
118127
}
119128

0 commit comments

Comments
 (0)