mirror of
https://github.com/encounter/uBlock.git
synced 2026-03-30 11:41:36 -07:00
fixed Chromium API complaining of invalid tabId
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user