Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit f3a91fa

Browse files
authored
Null-check for err object when submiting
When the clientside validation is done and it contains validation errors, the err object is null.
1 parent 6983b8b commit f3a91fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT
297297
// Set original value of $routeParams.create
298298
$routeParams.create = routeParamsCreate;
299299
// cleanup the blueprint immediately
300-
$scope.model.node.id = err.data.id;
300+
if (err && err.data) {
301+
$scope.model.node.id = err.data.id;
302+
}
301303
cleanup();
302304
vm.saveButtonState = "error";
303305
});

0 commit comments

Comments
 (0)