ソースを参照

Merge pull request #1364 from Siykt/fix/js-block

Fix: handleConditionCode add check
Ahmad Kholid 1 年間 前
コミット
f1c27a8d4c
1 ファイル変更3 行追加0 行削除
  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);
       }