Skip to content

Commit

Permalink
(nit) Improve queue position tracking variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
megawac committed Jul 20, 2016
1 parent 79734d2 commit ddef433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function queue(worker, concurrency, payload) {
throw new Error('Concurrency must not be zero');
}

function _insert(data, pos, callback) {
function _insert(data, insertAtFront, callback) {
if (callback != null && typeof callback !== 'function') {
throw new Error('task callback must be a function');
}
Expand All @@ -35,7 +35,7 @@ export default function queue(worker, concurrency, payload) {
callback: callback || noop
};

if (pos) {
if (insertAtFront) {
q._tasks.unshift(item);
} else {
q._tasks.push(item);
Expand Down

0 comments on commit ddef433

Please sign in to comment.