@plumeria/utils 18.2.25 → 18.2.26
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 +3 -0
- package/package.json +1 -1
package/dist/parser.js
CHANGED
|
@@ -561,6 +561,9 @@ function getPropertyKey(node, staticTable, keyframesHashTable, viewTransitionHas
|
|
|
561
561
|
if (exports.t.isStringLiteral(node)) {
|
|
562
562
|
return node.value;
|
|
563
563
|
}
|
|
564
|
+
if (node?.type === 'NumericLiteral') {
|
|
565
|
+
throw new Error(`[plumeria] The style key ${node.value} is a number. Style keys have to be names — quote it as '${node.value}' or rename it.`);
|
|
566
|
+
}
|
|
564
567
|
if (node.type === 'Computed') {
|
|
565
568
|
const expr = node.expression;
|
|
566
569
|
if (exports.t.isStringLiteral(expr)) {
|