Browse Source

fix: workflow stuck when selector is invalid

Ahmad Kholid 2 years ago
parent
commit
942911d5a6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/content/handleSelector.js

+ 2 - 1
src/content/handleSelector.js

@@ -104,7 +104,8 @@ export default async function (
 
 
     return elements;
     return elements;
   } catch (error) {
   } catch (error) {
-    console.error(error);
+    if (onError) onError(error);
+
     throw error;
     throw error;
   }
   }
 }
 }