HI guys, I’m starting the migration following the approach of first migrating to Async in Meteor 2.8
I tested by changing findOne
to findOneAsync
.
Example:
function async findOne(collection, selector = {}, options = {}){
collection.findOneAsync(selector, options)
}
function async getDocument(collection){
const document = await collection.findOne(collection)
}
When calling getDocument
I get:
(node:66702) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION] [ERR_ASSERTION]: Cannot await without a Fiber
Have you encountered this issue before or any ideas of how to handle it?
Thanks!