curl.lib.js
curl.lib.js copied to clipboard
_save is called incorrectly when search is interrupted
If you interrupt a PearlDiver search the code attempts to call the _save method, but is accesses it as an instance methods instead of passing the instance.
https://github.com/iotaledger/curl.lib.js/blob/2da1de36123d89b0c7dcababe24f72828bc5f794/src/pearldiver.js#L100
Should be
if(instance.state == PDState.INTERRUPTED) return _save(instance, searchObject);