1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 05:13:29 +00:00

[PM-3704] Autofil Command Should Not Attempt to Fill If Fields Are Not Found in Page Details (#6148)

This commit is contained in:
Cesar Gonzalez
2023-09-07 11:40:47 -05:00
committed by GitHub
parent fcde0c6420
commit 9beed08b76

View File

@@ -280,6 +280,10 @@ export default class AutofillService implements AutofillServiceInterface {
* @returns The TOTP code of the successfully autofilled login, if any
*/
async doAutoFillActiveTab(pageDetails: PageDetail[], fromCommand: boolean): Promise<string> {
if (!pageDetails[0]?.details?.fields?.length) {
return;
}
const tab = await this.getActiveTab();
if (!tab || !tab.url) {
return;