Open
Description
Description
This code: refreshApex({data: undefined, error: undefined})
will return undefined
rather than a promise. It should return a promise (resolved or rejected, either seems reasonable) to adhere to async conventions.
Steps to Reproduce
Call refreshApex({data: undefined, error: undefined}).then(() => console.log('x'))
, observe TypeError Cannot read property 'then' of undefined
.
Expected Results
No error is thrown (refreshApex returns a promise).
Actual Results
refreshApex returns undefined.
Browsers Affected
All.
Version
Current Salesforce.
Possible Solution
Return Promise.resolve()
instead, since this seems like a noop.
Activity