@@ -20,7 +20,7 @@ async function word(movies) {
2020 // end word text example
2121
2222 // print a message if no documents were found
23- if ( ( await cursor . count ( ) ) === 0 ) {
23+ if ( ( await movies . countDocuments ( query ) ) === 0 ) {
2424 console . log ( "No documents found!" ) ;
2525 }
2626 await cursor . forEach ( console . dir ) ;
@@ -41,7 +41,7 @@ async function phrase(movies) {
4141 // end phrase text example
4242
4343 // print a message if no documents were found
44- if ( ( await cursor . count ( ) ) == 0 ) {
44+ if ( ( await movies . countDocuments ( query ) ) = == 0 ) {
4545 console . log ( "No documents found!" ) ;
4646 }
4747 await cursor . forEach ( console . dir ) ;
@@ -62,7 +62,7 @@ async function negation(movies) {
6262 // end negation text example
6363
6464 // print a message if no documents were found
65- if ( ( await cursor . count ( ) ) == 0 ) {
65+ if ( ( await movies . countDocuments ( query ) ) = == 0 ) {
6666 console . log ( "No documents found!" ) ;
6767 }
6868 await cursor . forEach ( console . dir ) ;
@@ -89,7 +89,7 @@ async function relevance(movies) {
8989 // end relevance text example
9090
9191 // print a message if no documents were found
92- if ( ( await cursor . count ( ) ) === 0 ) {
92+ if ( ( await movies . countDocuments ( query ) ) === 0 ) {
9393 console . log ( "No documents found!" ) ;
9494 }
9595 await cursor . forEach ( console . dir ) ;
0 commit comments