aboutsummaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/chromium/vapi-background.js3
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;
}