Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit eddd83e

Browse files
committed
Update Object.js
1 parent 1b8b573 commit eddd83e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/Object.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.factory('BaseObject', ($q) => {
3232
*/
3333
cache(name, callback, permanent = false) {
3434
// sets (truthy) flag reference to promise + avoids redundant calls
35-
return this[name] || ( this[name] = callback()
35+
return this[name] || ( this[name] = $q.when(callback())
3636
// flag cleanup (doesn't affect chaining)
3737
.finally( () => {
3838
if (!permanent)

0 commit comments

Comments
 (0)