From 2cc5fb3b19850cdfd7545bb646fe2cd32275863e Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 12 Apr 2015 18:32:35 -0400 Subject: [PATCH] fixed Chromium API complaining of invalid tabId --- platform/chromium/vapi-background.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 482668922..22f49eb47 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; }