diff --git a/libs/importer/src/components/chrome/import-chrome.component.ts b/libs/importer/src/components/chrome/import-chrome.component.ts index 5467b08ee61..389ce23f837 100644 --- a/libs/importer/src/components/chrome/import-chrome.component.ts +++ b/libs/importer/src/components/chrome/import-chrome.component.ts @@ -112,8 +112,17 @@ export class ImportChromeComponent implements OnInit, OnDestroy { private i18nService: I18nService, ) { effect(async () => { - this.profileList = await this.onLoadProfilesFromBrowser(this.getBrowserName(this.format())); - // FIXME: Add error handling and display when profiles could not be loaded/retrieved + // Callback is set via @Input after constructor, so check it exists + if (this.onLoadProfilesFromBrowser) { + try { + this.profileList = await this.onLoadProfilesFromBrowser( + this.getBrowserName(this.format()), + ); + } catch (error) { + this.logService.error("Error loading profiles from browser:", error); + // FIXME: Add error handling and display when profiles could not be loaded/retrieved + } + } }); }