keycloakify 11.9.0-rc.1 → 11.9.1

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/bin/712.index.js CHANGED
@@ -114,9 +114,14 @@ function generateMessageProperties(params) {
114
114
  if (arg && arg.type === "ObjectExpression") {
115
115
  // Iterate over the properties of the object
116
116
  arg.properties.forEach(prop => {
117
- if (prop.type === "ObjectProperty" &&
118
- prop.key.type === "Identifier") {
119
- const lang = prop.key.name;
117
+ if (prop.type === "ObjectProperty") {
118
+ if (prop.key.type !== "Identifier" &&
119
+ prop.key.type !== "StringLiteral") {
120
+ return;
121
+ }
122
+ const lang = prop.key.type === "Identifier"
123
+ ? prop.key.name
124
+ : prop.key.value;
120
125
  const value = prop.value;
121
126
  if (value.type === "ObjectExpression") {
122
127
  let label = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloakify",
3
- "version": "11.9.0-rc.1",
3
+ "version": "11.9.1",
4
4
  "description": "Framework to create custom Keycloak UIs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -144,11 +144,17 @@ export function generateMessageProperties(params: {
144
144
  if (arg && arg.type === "ObjectExpression") {
145
145
  // Iterate over the properties of the object
146
146
  arg.properties.forEach(prop => {
147
- if (
148
- prop.type === "ObjectProperty" &&
149
- prop.key.type === "Identifier"
150
- ) {
151
- const lang = prop.key.name;
147
+ if (prop.type === "ObjectProperty") {
148
+ if (
149
+ prop.key.type !== "Identifier" &&
150
+ prop.key.type !== "StringLiteral"
151
+ ) {
152
+ return;
153
+ }
154
+ const lang =
155
+ prop.key.type === "Identifier"
156
+ ? prop.key.name
157
+ : prop.key.value;
152
158
  const value = prop.value;
153
159
 
154
160
  if (value.type === "ObjectExpression") {