inibase 1.0.0-rc.94 → 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.
- package/dist/index.js +2 -3
- 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 =
|
|
332
|
-
fieldType[0]);
|
|
331
|
+
fieldType = Utils.detectFieldType(value, fieldType) ?? fieldType[0];
|
|
333
332
|
if (!value)
|
|
334
333
|
return null;
|
|
335
|
-
if (
|
|
334
|
+
if (Array.isArray(value) && !["array", "json"].includes(fieldType))
|
|
336
335
|
value = value[0];
|
|
337
336
|
switch (fieldType) {
|
|
338
337
|
case "array":
|