react-i18next 16.1.2 → 16.1.3
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/CHANGELOG.md +4 -0
- package/dist/es/package.json +1 -1
- package/icu.macro.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/es/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"16.1.
|
|
1
|
+
{"type":"module","version":"16.1.3"}
|
package/icu.macro.js
CHANGED
|
@@ -364,7 +364,12 @@ function jsxElementToDeclaration(jsxElement, t) {
|
|
|
364
364
|
propValue = t.nullLiteral();
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
-
|
|
367
|
+
// Use string literal for keys that aren't valid identifiers (e.g., contain hyphens)
|
|
368
|
+
const propKey = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(propName)
|
|
369
|
+
? t.identifier(propName)
|
|
370
|
+
: t.stringLiteral(propName);
|
|
371
|
+
|
|
372
|
+
propsProperties.push(t.objectProperty(propKey, propValue));
|
|
368
373
|
}
|
|
369
374
|
});
|
|
370
375
|
|