Open obany opened 6 years ago
The library remove method uses unshift, which is for adding to a list.
https://github.com/iotaledger/curl.lib.js/blob/2da1de36123d89b0c7dcababe24f72828bc5f794/src/curl.lib.js#L168
This should be either be shift() if you are trying to remove the current job, or pop() if you are trying to remove the last added item.
That's right. Using the unshift-method without parameters just returns the last element of the array which is most likely not the intended behaviour here.
unshift
The library remove method uses unshift, which is for adding to a list.
https://github.com/iotaledger/curl.lib.js/blob/2da1de36123d89b0c7dcababe24f72828bc5f794/src/curl.lib.js#L168
This should be either be shift() if you are trying to remove the current job, or pop() if you are trying to remove the last added item.