node-red-contrib-mongodb2 icon indicating copy to clipboard operation
node-red-contrib-mongodb2 copied to clipboard

fix db and collection operations and returning obj instead of array

Open 586837r opened this issue 5 years ago • 2 comments

cloning the response breaks db and collection instances not sure if this is a good way to fix it but it works

586837r avatar Feb 06 '20 06:02 586837r

fixes #37

586837r avatar Feb 06 '20 06:02 586837r

I was looking into a fix too, and thought it would have been better to check whether 'response' is an array at that point, rather than hard-coding the methods... didn't have the time to do testing as I don't have a working nodered build right now.

Also, this will REQUIRE a docs entry & a full-version bump to 3.0 as this significantly changes behaviour and might break people's flows who have worked around the issue. (node-red won't automatically update a module acoss a major version, but will with a minor bump)

jomel avatar Feb 06 '20 15:02 jomel