From 0a17ba059791c2b1916ea385b39035b9004c4023 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 12 Apr 2015 18:56:26 -0400 Subject: [PATCH] code review --- platform/chromium/vapi-background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 22f49eb47..93324e7db 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -210,8 +210,9 @@ vAPI.tabs.get = function(tabId, callback) { } if ( typeof tabId !== 'number' || isNaN(tabId) ) { onTabReady(null); + } else { + chrome.tabs.get(tabId, onTabReady); } - chrome.tabs.get(tabId, onTabReady); return; } var onTabReceived = function(tabs) {