When redefining model.value it must be bound to the model to keep a runtime reference.

This commit is contained in:
Niels Lyngsø
2020-10-19 08:19:09 +02:00
parent 8980dfca36
commit 18309bccb6

View File

@@ -138,10 +138,10 @@
// We need to ensure that the property model value is an object, this is needed for modelObject to recive a reference and keep that updated.
if (typeof newVal !== 'object' || newVal === null) {// testing if we have null or undefined value or if the value is set to another type than Object.
newVal = {};
vm.model.value = newVal = {};
}
modelObject.update(newVal, $scope);
modelObject.update(vm.model.value, $scope);
onLoaded();
}