diff --git a/frontend/src/features/browser-profiles/profile-browser-dialog.ts b/frontend/src/features/browser-profiles/profile-browser-dialog.ts index 83b4dd7068..9166155afc 100644 --- a/frontend/src/features/browser-profiles/profile-browser-dialog.ts +++ b/frontend/src/features/browser-profiles/profile-browser-dialog.ts @@ -29,7 +29,6 @@ enum BrowserStatus { Initial, Pending, Ready, - Complete, Error, } @@ -54,6 +53,9 @@ export class ProfileBrowserDialog extends BtrixElement { @state() private browserStatus = BrowserStatus.Initial; + @state() + private originsLoaded = false; + @state() private showConfirmation = false; @@ -151,7 +153,8 @@ export class ProfileBrowserDialog extends BtrixElement { render() { const isCrawler = this.appState.isCrawler; const creatingNew = this.duplicating || !this.profile; - const incomplete = this.browserStatus !== BrowserStatus.Complete; + const incomplete = + !this.originsLoaded || this.browserStatus !== BrowserStatus.Ready; const saving = this.saveProfileTask.status === TaskStatus.PENDING; return html`, ) => { if (e.detail.origins.length) { - this.browserStatus = BrowserStatus.Complete; + this.originsLoaded = true; } }; diff --git a/frontend/src/features/browser-profiles/profile-browser.ts b/frontend/src/features/browser-profiles/profile-browser.ts index 9a48753f9e..61e4263fa4 100644 --- a/frontend/src/features/browser-profiles/profile-browser.ts +++ b/frontend/src/features/browser-profiles/profile-browser.ts @@ -173,11 +173,7 @@ export class ProfileBrowser extends BtrixElement { try { const { origins } = await this.pingBrowser(browser.id, signal); - if ( - this.originsTask.value && - origins && - isNotEqual(this.originsTask.value, origins) - ) { + if (origins && isNotEqual(this.originsTask.value, origins)) { this.dispatchEvent( new CustomEvent( "btrix-browser-origins-change",