diff --git a/lib/orm-timestamps.js b/lib/orm-timestamps.js index 9ae499d..6769021 100644 --- a/lib/orm-timestamps.js +++ b/lib/orm-timestamps.js @@ -27,8 +27,9 @@ function Plugin(db, opts) { next(); } + var that = this; oldHook.call(this, function() { - cont.call(this); + cont.call(that); }); if(oldHook.length == 0) cont.call(this); @@ -68,4 +69,4 @@ function Plugin(db, opts) { } }; -module.exports = Plugin; \ No newline at end of file +module.exports = Plugin;