meteor-simple-schema
meteor-simple-schema copied to clipboard
Update autoValue to accept async function
Is your feature request related to a problem? Please describe.
Meteor have updated their MongoDB functions to async, such as findOneAsync
, and if we use these functions in autoValue
function, we have to make the autoValue
function as async as well. However, it does not work as autoValue
seems won't wait for a promise when being calling.
Describe the solution you'd like
autoValue
can work for async function
Thank you @sherryysj I checked and this requirement applies to all fields that are computable.
@sherryysj might be of interest to you: https://github.com/Meteor-Community-Packages/meteor-simple-schema/pull/741#issuecomment-1931972172