瀏覽代碼

Fix path matching when path is undefined

simov 8 年之前
父節點
當前提交
0bc5b02331
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      background/background.js

+ 1 - 1
background/background.js

@@ -144,7 +144,7 @@ chrome.tabs.onUpdated.addListener((id, info, tab) => {
           state.origins['*://' + win.location.host] ||
           state.origins['*://*']
 
-        if (new RegExp(path).test(win.location.href)) {
+        if (path && new RegExp(path).test(win.location.href)) {
           inject(id)
         }
       }