1
0
Эх сурвалжийг харах

fix: handleConditionCode add check

siykt 1 жил өмнө
parent
commit
5e42c40f3c

+ 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);
       }