diff --git a/guide/source/2.7.4-migration.md b/guide/source/2.7.4-migration.md index 058a16cdfb..3db4e66ef3 100644 --- a/guide/source/2.7.4-migration.md +++ b/guide/source/2.7.4-migration.md @@ -5,7 +5,7 @@ description: How to migrate your application to Meteor 2.7.4. Meteor `2.7.4` introduce the new MongoDB Package Async API. For a complete breakdown of the changes, please refer to the [changelog](http://docs.meteor.com/changelog.html). -For this new async API, we have new methods like `findOneAsync`, which behaves exactly like the `findOne` method, but it now returns a promise that needs to be solved to get the data. +For this new async API, we have new methods like `findOneAsync`, which behaves exactly like the `findOne` method, but it now returns a promise that needs to be resolved to get the data.

Why this is important?

@@ -48,7 +48,7 @@ Yes and no. If you're not using any constructor, like `MongoInternals.RemoteCollectionDriver`, then yes. Your app will run normally. -But if you're using a construction like that one, then an error be thrown because these are async now. In this case, you have two options: +But if you're using a construction like that one, then an error will be thrown because these are async now. In this case, you have two options: - You can wrap the call in an async function, like so: ```js async function Connection() { @@ -60,7 +60,9 @@ But if you're using a construction like that one, then an error be thrown becaus const Connection = new MongoInternals.RemoteCollectionDriver(/.../).await(); ``` -The last option is easier for a quick fix. Just bear in mind that the function `.await()` in working with Fibers, meaning that it'll be deprecated in the future. +The last option is easier for a quick fix. Just bear in mind that the function `.await()` is working with Fibers, meaning that it'll be deprecated in the future. + +Also, remember to add the `ecmascript` package, otherwise the async won't work. The `ecmascript` package has the build plugin that compiles await and async to run within fibers.

Migrating from a version older than 2.7.4?