Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3456

FindCursor [asyncIterator]

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      Unable to find source-code formatter for language: node. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      const cursor = col.find({...});
      for await (const doc of cursor) {
         console.log(doc) // doc has type of <null | Document>
      }
      

      I think this is an error and the doc should always have the Document type.
      What is the point of giving null in this loop?

            Assignee:
            Unassigned Unassigned
            Reporter:
            nexcode@ya.ru Oleg Trifonov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: