Forráskód Böngészése

fix(node-engine): glob null drilldown error, typeof null is object (#417)

Yiwei Mao 7 hónapja
szülő
commit
bf69e6cb89
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      packages/node-engine/form/src/utils/glob.ts

+ 1 - 1
packages/node-engine/form/src/utils/glob.ts

@@ -146,7 +146,7 @@ export namespace Glob {
     let curPaths: string[] = [];
     let curValue = obj;
     while (curKey) {
-      let isObject = typeof curValue === 'object';
+      let isObject = typeof curValue === 'object' && curValue !== null;
       if (!isObject) return [];
       // 匹配 *
       if (curKey === ALL) {