Commits

Dariusz Luksza committed 483f6d1

Fix compilation issue on fantom 1.0.61

  • Participants
  • Parent commits f629a05

Comments (0)

Files changed (1)

     cmd.set("count", coll.name).set("query", selector).set("fields", opts["fields"])
     res := coll.db.command(cmd)
     if (DB.cmdOk(res)) {
-      c := (res["n"] as Float).toInt
+      c := (res["n"] as Float)?.toInt
+      if (c == null)
+        throw MongoOpErr("cannot find \"n\" in response")
       return c.min(opts.get("limit", c)).minus(opts.get("skip", 0))
     } 
     else if (res["errmsg"] == "ns missing")