Explorar el Código

fix: xpath RegEx

Ahmad Kholid hace 2 años
padre
commit
f31d4563db
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);
 }