From 6361a36f81e577bf0674a2d2e837b4e93fe61e1b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 21 Sep 2016 22:27:18 -0400 Subject: [PATCH] autofill updates --- src/popup/app/current/currentController.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/popup/app/current/currentController.js b/src/popup/app/current/currentController.js index 2eec1dcfbd..f31fe5fc92 100644 --- a/src/popup/app/current/currentController.js +++ b/src/popup/app/current/currentController.js @@ -72,7 +72,7 @@ angular fillScript = autofillService.generateFillScript(pageDetails, site.username, site.password); } - if (tabId && fillScript) { + if (tabId && fillScript && fillScript.script && fillScript.script.length) { chrome.tabs.sendMessage(tabId, { command: 'fillForm', fillScript: fillScript @@ -81,7 +81,8 @@ angular }); } else { - toastr.error('Unable to auto-fill the selected site. Copy/paste your username and/or password instead.'); + toastr.error('Unable to auto-fill the selected site on this page. ' + + 'Copy/paste your username and/or password instead.'); } };