瀏覽代碼

fix: xpath RegEx

Ahmad Kholid 2 年之前
父節點
當前提交
f31d4563db
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/utils/helper.js

+ 1 - 1
src/utils/helper.js

@@ -1,7 +1,7 @@
 import browser from 'webextension-polyfill';
 
 export function isXPath(str) {
-  const regex = /^[(/@]/;
+  const regex = /^([(/@]|id\()/;
 
   return regex.test(str);
 }