node-red-nodes icon indicating copy to clipboard operation
node-red-nodes copied to clipboard

Update 66-mongodb.js

Open dodois opened this issue 4 years ago • 1 comments

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ x ] New feature (non-breaking change which adds functionality)

Proposed changes

Call done when the operation is complete

Checklist

  • [ x ] I have read the contribution guidelines
  • [ x ] For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • [ x ] I have run grunt to verify the unit tests pass
  • [ ] I have added suitable unit tests to cover the new/changed functionality

dodois avatar Jul 20 '21 03:07 dodois

Hi @dodois

Useful update but as the done capability was added later - you need to check if it exists before calling it in case someone is running a very old version that doesn't pass it it.

eg see - https://github.com/node-red/node-red-nodes/blob/master/storage/mysql/68-mysql.js#L110 and https://github.com/node-red/node-red-nodes/blob/master/storage/mysql/68-mysql.js#L110

dceejay avatar Jul 20 '21 21:07 dceejay