8000 enable remove to be called provided no callbacks · JavaScriptExpert/kue@5400c7d · GitHub
[go: up one dir, main page]

Skip to content

Commit 5400c7d

Browse files
committed
enable remove to be called provided no callbacks
1 parent cecd631 commit 5400c7d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/queue/job.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ exports.get = function (id, fn) {
189189
*/
190190

191191
exports.remove = function (id, fn) {
192+
fn = fn || noop;
192193
exports.get(id, function (err, job) {
193194
if (err) return fn(err);
194195
if (!job) return fn(new Error('failed to find job ' + id));

0 commit comments

Comments
 (0)
0