Fixes issue with umbsetdirtyonchange.directive

This commit is contained in:
Shannon
2018-10-16 13:18:21 +11:00
parent 339417b977
commit 466d782db4
2 changed files with 6 additions and 5 deletions

View File

@@ -7,7 +7,7 @@
var formCtrl = ctrls[0];
if (ctrls.length > 1) {
if (ctrls.length > 1 && ctrls[1]) {
//if an ngModel is supplied, assign a render function which is called when the model is changed
var modelCtrl = ctrls[1];
var oldRender = modelCtrl.$render;
@@ -17,8 +17,9 @@
if (oldRender) {
oldRender();
}
};
} else {
}
}
else {
var initValue = attr.umbSetDirtyOnChange;
attr.$observe("umbSetDirtyOnChange", function (newValue) {

View File

@@ -888,8 +888,8 @@ angular.module("umbraco")
angular.forEach($scope.availableEditors, function (value, key) {
//If no translation is provided, keep using the editor name from the manifest
if (localizationService.dictionary.hasOwnProperty("grid_" + value.alias)) {
localizationService.localize("grid_" + value.alias).then(function(value){
value.name = value;
localizationService.localize("grid_" + value.alias).then(function(v){
value.name = v;
});
}
});