Procházet zdrojové kódy

fix: handleConditionCode add check

siykt před 1 rokem
rodič
revize
5e42c40f3c
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      src/sandbox/utils/handleConditionCode.js

+ 3 - 0
src/sandbox/utils/handleConditionCode.js

@@ -5,6 +5,9 @@ export default function (data) {
   script.textContent = `
     (async () => {
       function automaRefData(keyword, path = '') {
+        if (!keyword) return null;
+        if (!path) return ${propertyName}.refData[keyword];
+
         return window.$getNestedProperties(${propertyName}.refData, keyword + '.' + path);
       }