@quatrain/core 0.5.3 → 0.5.4
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/lib/components/DataObject.js +10 -2
- package/package.json +1 -1
|
@@ -221,10 +221,18 @@ class DataObject {
|
|
|
221
221
|
const value = prop.val();
|
|
222
222
|
Reflect.set(data, key, value
|
|
223
223
|
? objectsAsReferences && !(value instanceof ObjectUri_1.ObjectUri)
|
|
224
|
-
? value.core.asReference()
|
|
225
|
-
: value.toJSON
|
|
224
|
+
? value.core.asReference()
|
|
225
|
+
: value.toJSON
|
|
226
|
+
? value.toJSON()
|
|
227
|
+
: value
|
|
226
228
|
: null);
|
|
227
229
|
break;
|
|
230
|
+
case 'BooleanProperty':
|
|
231
|
+
Reflect.set(data, key, Boolean(prop.val()));
|
|
232
|
+
break;
|
|
233
|
+
case 'ArrayProperty':
|
|
234
|
+
Reflect.set(data, key, prop.val() || []);
|
|
235
|
+
break;
|
|
228
236
|
default:
|
|
229
237
|
Reflect.set(data, key, prop.val() || null);
|
|
230
238
|
}
|