Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddd916f commit 1b8b573Copy full SHA for 1b8b573
modules/Object.js
@@ -32,12 +32,13 @@ module.factory('BaseObject', ($q) => {
32
*/
33
cache(name, callback, permanent = false) {
34
// sets (truthy) flag reference to promise + avoids redundant calls
35
- return this[name] || this[name] = callback()
+ return this[name] || ( this[name] = callback()
36
// flag cleanup (doesn't affect chaining)
37
.finally( () => {
38
if (!permanent)
39
this[name] = null;
40
- });
+ })
41
+ );
42
}
43
44
/**
0 commit comments