From abc42b5438dd64a4b5856d0a190787d1abc18d9d Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 20 Oct 2020 12:26:40 +0100 Subject: [PATCH] Merge pull request #9215 from umbraco/v8/bugfix/9129-keep-model-value-reference-after-empty 9129 keep model value reference after empty --- .../blocklist/umbBlockListPropertyEditor.component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js index 401ecc3a63..a162814f52 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbBlockListPropertyEditor.component.js @@ -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(); }