mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-30 02:34:26 +02:00
Fix undefined error (#675)
This commit is contained in:
parent
cec5d46f3d
commit
545d512872
@ -350,7 +350,7 @@ extensionApi.webRequest.onBeforeSendHeaders.addListener(function (details) {
|
||||
if (tabId !== -1) {
|
||||
extensionApi.tabs.get(tabId, function (currentTab) {
|
||||
// Validate url of current tab to avoid injecting script to unrelated sites
|
||||
if (currentTab && isSiteEnabled(currentTab)) {
|
||||
if (currentTab && currentTab.url && isSiteEnabled(currentTab)) {
|
||||
// run contentScript inside tab
|
||||
extensionApi.tabs.executeScript(tabId, {
|
||||
file: 'src/js/contentScript.js',
|
||||
|
Loading…
x
Reference in New Issue
Block a user