I found when connecting to mongodb, if som < res.length, the connection will fail.
I'm not sure why this happen, but it did happen on my computer. (It seems sometimes mongodb returns useless data in response?)
so I combine the logic about (som < res.length) and (som == res.length) to fix that case.
Yeah, sorry I had corrected this locally but apparently forgot to push it out. Thanks for the catch (I'm not the best with git, if you haven't figured that out already, lol). I appreciate it. :)
I found when connecting to mongodb, if som < res.length, the connection will fail. I'm not sure why this happen, but it did happen on my computer. (It seems sometimes mongodb returns useless data in response?)
so I combine the logic about (som < res.length) and (som == res.length) to fix that case.