mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-02 04:48:57 +02:00
[PM-6948] Fix race condition that breaks autofill within the current tab component (#8393)
This commit is contained in:
parent
b450b31ec4
commit
19c97fb796
@ -262,14 +262,6 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
this.hostname = Utils.getHostname(this.url);
|
this.hostname = Utils.getHostname(this.url);
|
||||||
this.pageDetails = [];
|
this.pageDetails = [];
|
||||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
||||||
BrowserApi.tabSendMessage(this.tab, {
|
|
||||||
command: "collectPageDetails",
|
|
||||||
tab: this.tab,
|
|
||||||
sender: BroadcasterSubscriptionId,
|
|
||||||
});
|
|
||||||
|
|
||||||
const otherTypes: CipherType[] = [];
|
const otherTypes: CipherType[] = [];
|
||||||
const dontShowCards = !(await firstValueFrom(this.vaultSettingsService.showCardsCurrentTab$));
|
const dontShowCards = !(await firstValueFrom(this.vaultSettingsService.showCardsCurrentTab$));
|
||||||
const dontShowIdentities = !(await firstValueFrom(
|
const dontShowIdentities = !(await firstValueFrom(
|
||||||
@ -310,9 +302,18 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.loginCiphers.length) {
|
||||||
|
void BrowserApi.tabSendMessage(this.tab, {
|
||||||
|
command: "collectPageDetails",
|
||||||
|
tab: this.tab,
|
||||||
|
sender: BroadcasterSubscriptionId,
|
||||||
|
});
|
||||||
|
|
||||||
this.loginCiphers = this.loginCiphers.sort((a, b) =>
|
this.loginCiphers = this.loginCiphers.sort((a, b) =>
|
||||||
this.cipherService.sortCiphersByLastUsedThenName(a, b),
|
this.cipherService.sortCiphersByLastUsedThenName(a, b),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this.isLoading = this.loaded = true;
|
this.isLoading = this.loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user