Browse Source

fix: query value

Ahmad Kholid 1 year ago
parent
commit
1332572991
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/execute/index.js

+ 5 - 1
src/execute/index.js

@@ -1,3 +1,4 @@
+import { parseJSON } from '@/utils/helper';
 import { sendMessage } from '@/utils/message';
 import Browser from 'webextension-polyfill';
 
@@ -11,7 +12,10 @@ function getWorkflowDetail() {
   const { 1: workflowId } = pathname.split('/');
 
   searchParams.forEach((key, value) => {
-    variables[key] = decodeURIComponent(value);
+    const varValue = parseJSON(decodeURIComponent(value), '##_empty');
+    if (varValue === '##_empty') return;
+
+    variables[key] = varValue;
   });
 
   return { workflowId: workflowId ?? '', variables };