Open obany opened 6 years ago
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);
if(instance.state == PDState.INTERRUPTED) return _save(instance, searchObject);
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);