From 59c0e3f9886fb79d489b4d08b990499b902a9e4b Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Tue, 2 Oct 2018 11:45:06 +0100 Subject: [PATCH] Uses underscorejs omit to remove the 'apps' from the object we copy to avoid a never ending nested tree of apps in the JSON --- .../components/content/umbvariantcontenteditors.directive.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js index 46d0a1c5c1..a3a212a603 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js @@ -186,14 +186,15 @@ } else { vm.openVariants[editorIndex] = variant.language.culture; } - + } //then assign the variant to a view model to the content app var contentApp = _.find(variant.apps, function (a) { return a.alias === "umbContent"; }); - contentApp.viewModel = variant; + + contentApp.viewModel = _.omit(variant, 'apps'); // make sure the same app it set to active in the new variant if(activeAppAlias) {