Fixes: U4-2690 data type editor, makes 2 requests for the initial load
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user