Open
Description
I think this line is to blame:
vue-async-computed/src/index.js
Line 160 in 71020d6
Logic goes like this:
- "isComputedLazy": "Does the asyncComputed property have the 'lazy' property?
- "isLazyActive": "Is the [lazy] property set to true?
- If both above are true, then it does
return nonLazy.call(this)
.
Note the last step. That seems backwards. Shouldn't it be return silentGetLazy(this, key)
, if this is a [lazy] property, and set to active?
In my .vue file I have a simple asyncComputed property with lazy: true, and a console.log within it's getter. The console.log fires whenever a referenced property updates, even though lazy is set to true.
CallRecordingInfo: {
default() { return false; },
lazy: false,
get() {
if (!this.Call || !this.Call.Call) return Promise.resolve(false);
console.log('Updating CalLRecordingInfo', this);
return api.calls().getRecordingUrl(
this.UUID,
this.HQCo,
this.Call.Call,
).catch(() => Promise.resolve(false));
},
},
When looking at the console.log output for this
, it shows async_computed$lazy_active$CallRecordingInfo: true
and async_computed$lazy_data$CallRecordingInfo: Object
.
Am I missing something?
Metadata
Metadata
Assignees
Labels
No labels