From ea8f1c3ae3bbccc2109beb3b5a0b8f4c16fe3a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 25 Nov 2019 15:47:45 +0100 Subject: [PATCH] make umbProperty optional, since its not present in DocumentTypeEditor --- .../nestedcontent/nestedcontent.component.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.component.js index 0504e29a8b..64bd8eb1ec 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.component.js @@ -8,7 +8,7 @@ controller: NestedContentController, controllerAs: 'vm', require: { - umbProperty: '^umbProperty', + umbProperty: '?^umbProperty', umbVariantContent: '?^^umbVariantContent' } }); @@ -534,7 +534,7 @@ } function updatePropertyActionStates() { - copyAllEntriesAction.isDisabled = model.value.length === 0; + copyAllEntriesAction.isDisabled = !model.value || model.value.length === 0; } @@ -544,7 +544,9 @@ ]; this.$onInit = function () { - this.umbProperty.setPropertyActions(propertyActions); + if (this.umbProperty) { + this.umbProperty.setPropertyActions(propertyActions); + } }; var unsubscribe = $scope.$on("formSubmitting", function (ev, args) {