From f54872641e8bcb1a710fdf869042978a69c80891 Mon Sep 17 00:00:00 2001 From: Louis Chatriot Date: Sat, 22 Jun 2013 18:19:37 +0200 Subject: [PATCH] Fixed bug in the executor preventing usage of update and remove without callback --- lib/datastore.js | 1 - lib/executor.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/datastore.js b/lib/datastore.js index 69165fd..e12ab8b 100644 --- a/lib/datastore.js +++ b/lib/datastore.js @@ -590,5 +590,4 @@ Datastore.prototype.remove = function () { - module.exports = Datastore; diff --git a/lib/executor.js b/lib/executor.js index a8eace0..2f0307d 100644 --- a/lib/executor.js +++ b/lib/executor.js @@ -24,7 +24,8 @@ function Executor () { cb(); }; - task.arguments.push(callback); + // task.arguments is an array-like object so push is not available + task.arguments[task.arguments.length] = callback; } task.fn.apply(task.this, task.arguments);