diff --git a/src/SeoToolkit.Umbraco.Common/App_Plugins/SeoToolkit/ContentApps/DocumentType/seoSettings.controller.js b/src/SeoToolkit.Umbraco.Common/App_Plugins/SeoToolkit/ContentApps/DocumentType/seoSettings.controller.js index 5eaa15f8..83566211 100644 --- a/src/SeoToolkit.Umbraco.Common/App_Plugins/SeoToolkit/ContentApps/DocumentType/seoSettings.controller.js +++ b/src/SeoToolkit.Umbraco.Common/App_Plugins/SeoToolkit/ContentApps/DocumentType/seoSettings.controller.js @@ -43,7 +43,7 @@ } function save() { - $http.post("backoffice/SeoToolkit/SeoSettings/Set", + return $http.post("backoffice/SeoToolkit/SeoSettings/Set", { contentTypeId: $scope.model.id, enabled: vm.model.enableSeoSettings @@ -58,11 +58,11 @@ $scope.$on("formSubmitting", function () { - save(); - - if (vm.model.enableSeoSettings) { - $scope.$broadcast("seoSettingsSubmitting"); - } + save().then(function() { + if (vm.model.enableSeoSettings) { + $scope.$broadcast("seoSettingsSubmitting"); + } + }); }); init();