projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8671b4f
)
crmStatus - Fix for use without a promise.
author
Tim Otten
<totten@civicrm.org>
Sat, 24 Jan 2015 00:18:36 +0000
(16:18 -0800)
committer
Tim Otten
<totten@civicrm.org>
Sat, 24 Jan 2015 02:46:43 +0000
(18:46 -0800)
js/angular-crm-util.js
patch
|
blob
|
blame
|
history
diff --git
a/js/angular-crm-util.js
b/js/angular-crm-util.js
index b889346dcfd0e4cbee68d33be71a29c03965b5b0..62437f558f1714290f48969c18a6252066ba32bc 100644
(file)
--- a/
js/angular-crm-util.js
+++ b/
js/angular-crm-util.js
@@
-101,7
+101,11
@@
// example: crmStatus('Saving', crmApi(...)).then(function(result){...})
angular.module('crmUtil').factory('crmStatus', function($q){
return function(options, aPromise){
- return CRM.toAPromise($q, CRM.status(options, CRM.toJqPromise(aPromise)));
+ if (aPromise) {
+ return CRM.toAPromise($q, CRM.status(options, CRM.toJqPromise(aPromise)));
+ } else {
+ return CRM.toAPromise($q, CRM.status(options));
+ }
};
});