node-red-contrib-mongodb2
node-red-contrib-mongodb2 copied to clipboard
fix db and collection operations and returning obj instead of array
cloning the response breaks db and collection instances not sure if this is a good way to fix it but it works
fixes #37
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)