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

Commit 074faa5

Browse files
committed
Cleanup threw a js error when closing the dialog before selecting doctype
Check for the existence of $scope.model.node before deleting the blueprint
1 parent db25fc0 commit 074faa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocT
244244
vm.blueprintConfig = blueprintConfig;
245245

246246
function cleanup() {
247-
if ($scope.model.node.id > 0){
247+
if ($scope.model.node && $scope.model.node.id > 0){
248248
// delete any temporary blueprints used for validation
249249
contentResource.deleteBlueprint($scope.model.node.id);
250250
}

0 commit comments

Comments
 (0)