@open3cl/engine 1.0.5 → 1.0.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils.js +2 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open3cl/engine",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Open Source 3CL-DPE engine",
5
5
  "main": "index.js",
6
6
  "directories": {
package/utils.js CHANGED
@@ -287,12 +287,8 @@ export function removeKeyFromJSON(jsonObj, keyToRemove, skipKeys) {
287
287
  export function useEnumAsString(jsonObj) {
288
288
  for (const key in jsonObj) {
289
289
  if (jsonObj.hasOwnProperty(key)) {
290
- if (key === 'donnee_entree') {
291
- for (const kde in jsonObj[key]) {
292
- if (kde.startsWith('enum_')) {
293
- jsonObj[key][kde] = jsonObj[key][kde].toString();
294
- }
295
- }
290
+ if (key.startsWith('enum_')) {
291
+ jsonObj[key] = jsonObj[key].toString();
296
292
  } else if (typeof jsonObj[key] === 'object') {
297
293
  useEnumAsString(jsonObj[key]);
298
294
  }