diff options
author | gorhill <rhill@raymondhill.net> | 2015-04-12 18:32:35 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-04-12 18:32:35 -0400 |
commit | 2cc5fb3b19850cdfd7545bb646fe2cd32275863e (patch) | |
tree | 3da468aee3c02c03a3da17dc1cf0ea954e63422d /platform | |
parent | 4023d0cd8414ed31899a26c2b4ec77f47ebaab7d (diff) | |
download | uBlock-2cc5fb3b19850cdfd7545bb646fe2cd32275863e.zip uBlock-2cc5fb3b19850cdfd7545bb646fe2cd32275863e.tar.gz uBlock-2cc5fb3b19850cdfd7545bb646fe2cd32275863e.tar.bz2 |
fixed Chromium API complaining of invalid tabId
Diffstat (limited to 'platform')
-rw-r--r-- | platform/chromium/vapi-background.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 4826689..22f49eb 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -208,6 +208,9 @@ vAPI.tabs.get = function(tabId, callback) { if ( typeof tabId === 'string' ) { tabId = parseInt(tabId, 10); } + if ( typeof tabId !== 'number' || isNaN(tabId) ) { + onTabReady(null); + } chrome.tabs.get(tabId, onTabReady); return; } |