meteor-simple-schema icon indicating copy to clipboard operation
meteor-simple-schema copied to clipboard

Update autoValue to accept async function

Open sherryysj opened this issue 1 year ago • 2 comments

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

sherryysj avatar Oct 24 '23 00:10 sherryysj

Thank you @sherryysj I checked and this requirement applies to all fields that are computable.

jankapunkt avatar Oct 24 '23 06:10 jankapunkt

@sherryysj might be of interest to you: https://github.com/Meteor-Community-Packages/meteor-simple-schema/pull/741#issuecomment-1931972172

jankapunkt avatar Feb 07 '24 12:02 jankapunkt