ghost-inspector / node-ghost-inspector

Ghost Inspector CLl & API Library for Node.js
https://ghostinspector.com/docs/api/
MIT License
28 stars 6 forks source link

Avoid mutating `options` parameter #11

Closed justinklemm closed 4 years ago

justinklemm commented 4 years ago

That options.immediate = true line that’s now executed (when polling can be used) is mutating the options object that’s passed into the function — which shouldn’t happen. I’ve updated the logic to make a copy of the incoming options and avoid mutating the original.