From 72c173dbee904267d637e1ac5347bae12fb583fa Mon Sep 17 00:00:00 2001 From: perploug Date: Thu, 31 Oct 2013 12:44:35 +0100 Subject: [PATCH] Fixes: U4-2690 data type editor, makes 2 requests for the initial load --- .../src/views/datatype/datatype.edit.controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/datatype/datatype.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/datatype/datatype.edit.controller.js index e5f62a1d8d..baea7df43c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/datatype/datatype.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/datatype/datatype.edit.controller.js @@ -70,8 +70,9 @@ function DataTypeEditController($scope, $routeParams, $location, dataTypeResourc } $scope.$watch("content.selectedEditor", function (newVal, oldVal) { + //when the value changes, we need to dynamically load in the new editor - if (newVal !== null && newVal !== undefined && newVal != oldVal) { + if (oldVal !== null && newVal !== null && newVal !== undefined && newVal != oldVal) { //we are editing so get the content item from the server var currDataTypeId = $routeParams.create ? undefined : $routeParams.id; dataTypeResource.getPreValues(newVal, currDataTypeId)