From 376fa0b8d97792e7ee683b751b5a93728d55a084 Mon Sep 17 00:00:00 2001 From: Pedro Kiefer Date: Wed, 3 Dec 2014 16:31:59 -0200 Subject: [PATCH] Fix _setupFlight _setupFlight isArray was checking the wrong variable. --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 74b73bd..a4cefa8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -12,7 +12,7 @@ function _setupFlight(type, tasksOrFn, fn) { var tasks; if(typeof tasksOrFn === 'string') { tasks = [tasksOrFn]; - } else if(Array.isArray(tasks)) { + } else if(Array.isArray(tasksOrFn)) { tasks = tasksOrFn; } else { tasks = [DEFAULT_TASK]; @@ -321,4 +321,4 @@ Flightplan.prototype.abort = function(message) { }; var instance = new Flightplan(); -module.exports = instance; \ No newline at end of file +module.exports = instance;