From: Tim Otten Date: Tue, 6 Jan 2015 00:03:24 +0000 (-0800) Subject: js/angular-crmCaseType.js - Fix regression in promise X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3140a41538f28fbbb2cb61ac6810bca9263ef16b;p=civicrm-core.git js/angular-crmCaseType.js - Fix regression in promise This line was written when crmApi() return jQuery-style promises. It returns Angular-style promises. --- diff --git a/js/angular-crmCaseType.js b/js/angular-crmCaseType.js index dcf752a08f..f8ae955148 100644 --- a/js/angular-crmCaseType.js +++ b/js/angular-crmCaseType.js @@ -278,7 +278,7 @@ $scope.save = function() { var result = crmApi('CaseType', 'create', $scope.caseType, true); - result.success(function(data) { + result.then(function(data) { if (data.is_error === 0 || data.is_error == '0') { $scope.caseType.id = data.id; window.location.href = '#/caseType';