delete-empty
delete-empty copied to clipboard
Sometimes callback would never be called
https://github.com/jonschlinkert/delete-empty/blob/6ae34547663e6845c3c98b184c606fa90ef79c0a/index.js#L50
This error should be passed to the callback.
Can you provide some example code with a case where this is causing a bug?
If so, a PR with a fix for the bug will be welcome.
Assumes the user is using "async callback" API:
const deleteEmpty = require("delete-empty");
const path = undefined; // assumes the input is wrong
const onDone = (err, result) => console.log("finished", err, result);
try {
deleteEmpty(path, onDone);
} catch (err) {
console.log("err", err);
}
You will get an unhandled promise. REPL