[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

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;