Skip to content

Commit d1e7c84

Browse files
committed
DOCSP-14121: remove await on watch()
1 parent a190d63 commit d1e7c84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/usage-examples/changeStream.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In the example below, the ``$match`` stage will match all change event documents
2020
.. code-block:: javascript
2121

2222
const pipeline = [ { $match: { runtime: { $lt: 15 } } ];
23-
const changeStream = await collection.watch(pipeline);
23+
const changeStream = collection.watch(pipeline);
2424

2525
The ``watch()`` method accepts an ``options`` object as the second parameter. Refer to the links at the end of this
2626
section for more information on the settings you can configure with this object.
@@ -92,7 +92,7 @@ methods presented above:
9292

9393
.. code-block:: javascript
9494

95-
const changeStream = await collection.watch();
95+
const changeStream = collection.watch();
9696
const options = { fullDocument: "updateLookup" };
9797
changeStream.on("change", callbackFunction, options);
9898

0 commit comments

Comments
 (0)