inibase 1.0.0-rc.95 → 1.0.0-rc.96

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/dist/index.js +2 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -328,11 +328,10 @@ export default class Inibase {
328
328
  }
329
329
  formatField(value, fieldType, fieldChildrenType, _formatOnlyAvailiableKeys) {
330
330
  if (Array.isArray(fieldType))
331
- fieldType = (Utils.detectFieldType(value, fieldType) ??
332
- fieldType[0]);
331
+ fieldType = Utils.detectFieldType(value, fieldType) ?? fieldType[0];
333
332
  if (!value)
334
333
  return null;
335
- if (fieldType !== "array" && fieldType !== "json" && Array.isArray(value))
334
+ if (Array.isArray(value) && !["array", "json"].includes(fieldType))
336
335
  value = value[0];
337
336
  switch (fieldType) {
338
337
  case "array":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inibase",
3
- "version": "1.0.0-rc.95",
3
+ "version": "1.0.0-rc.96",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "Karim Amahtil",