|
@@ -457,13 +457,15 @@ const execMetaReorderingInstructions = (metaG: StringMap<any>) => {
|
|
|
|
|
|
|
|
|
|
|
|
+const isRealObject = val => val !== null && typeof val === 'object';
|
|
|
+
|
|
|
const generateNewModel = (originalModel, updates) => {
|
|
|
return updateObject(originalModel, updates);
|
|
|
};
|
|
|
|
|
|
const updateObject = (obj, updates, createAdditionalKeys = false) => {
|
|
|
|
|
|
- if (typeof obj !== 'object') {
|
|
|
+ if (!isRealObject(obj)) {
|
|
|
obj = {};
|
|
|
}
|
|
|
console.log('obj is', obj, typeof obj);
|