Skip to content

Commit

Permalink
Revert "Update CRM.status for compatability with native js promises"
Browse files Browse the repository at this point in the history
This reverts commit 5e67407.
It was causing loading errors at ext/message_admin/ang/crmMsgadm/User.js#L18
  • Loading branch information
colemanw committed Sep 6, 2023
1 parent 852d1e6 commit ef7dcbf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,11 +1320,12 @@ if (!CRM.vars) CRM.vars = {};
}
}
return (deferred || new $.Deferred())
.then(function(data) {
.done(function(data) {
// If the server returns an error msg call the error handler
var status = $.isPlainObject(data) && (data.is_error || data.status === 'error') ? 'error' : 'success';
handle(status, data);
}, function(data) {
})
.fail(function(data) {
handle('error', data);
});
};
Expand Down

0 comments on commit ef7dcbf

Please sign in to comment.