diff --git a/.gitignore b/.gitignore index 4fc877d6..0232292b 100755 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ node_modules *.rdb test/incomplete *.swp +yarn.lock diff --git a/lib/queue/job.js b/lib/queue/job.js index 204aff27..bbac4740 100644 --- a/lib/queue/job.js +++ b/lib/queue/job.js @@ -159,13 +159,13 @@ exports.rangeByType = function( type, state, from, to, order, fn ) { */ exports.get = function( id, jobType, fn ) { - if (id === null || id === undefined) { - return fn(new Error('invalid id param')); - } if (typeof jobType === 'function' && !fn) { fn = jobType; jobType = ''; } + if (id === null || id === undefined) { + return fn(new Error('invalid id param')); + } var client = redis.client() , job = new Job;