@plumeria/utils 18.3.11 → 18.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parser.js +16 -8
- package/package.json +1 -1
package/dist/parser.js
CHANGED
|
@@ -825,15 +825,23 @@ function resolveVariantsTableMemberExpression(node, variantsHashTable) {
|
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
827
|
function resolveStaticTableMemberExpression(node, staticTable) {
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
828
|
+
const keys = [];
|
|
829
|
+
let current = node;
|
|
830
|
+
while (exports.t.isMemberExpression(current)) {
|
|
831
|
+
if (!exports.t.isIdentifier(current.property))
|
|
832
|
+
return undefined;
|
|
833
|
+
keys.unshift(current.property.value);
|
|
834
|
+
current = current.object;
|
|
835
835
|
}
|
|
836
|
-
|
|
836
|
+
if (!exports.t.isIdentifier(current))
|
|
837
|
+
return undefined;
|
|
838
|
+
let value = staticTable[current.value];
|
|
839
|
+
for (const key of keys) {
|
|
840
|
+
if (!value || typeof value !== 'object' || !(key in value))
|
|
841
|
+
return undefined;
|
|
842
|
+
value = value[key];
|
|
843
|
+
}
|
|
844
|
+
return value;
|
|
837
845
|
}
|
|
838
846
|
function resolveCreateThemeTableMemberExpressionByNode(node, createThemeHashTable, createThemeObjectTable) {
|
|
839
847
|
if (exports.t.isMemberExpression(node) && exports.t.isIdentifier(node.object)) {
|