From 97ecb2efe91c00fc6713204ab200dad024c08514 Mon Sep 17 00:00:00 2001 From: Torbjorn Tyridal Date: Thu, 3 Sep 2015 08:10:09 +0200 Subject: [PATCH] avoid stacktrace if opened with about:blank etc --- ext/lib/main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/lib/main.js b/ext/lib/main.js index b3c99c6..9d58095 100644 --- a/ext/lib/main.js +++ b/ext/lib/main.js @@ -147,8 +147,12 @@ function createPanel() { contentScriptFile: self.data.url('password-fill-cs.js'), attachTo: ['existing','top'], onAttach: function(worker) { - if (!worker.tab || worker.tab.id != tabs.activeTab.id) worker.destroy(); - worker.port.emit('the_password', d); + if (!worker.tab || worker.tab.id != tabs.activeTab.id) { + worker.destroy(); + } + else { + worker.port.emit('the_password', d); + } worker.destroy(); pm.destroy(); }