diff --git a/lib/application.js b/lib/application.js index 232d9db..f260ece 100644 --- a/lib/application.js +++ b/lib/application.js @@ -102,10 +102,14 @@ app.use = function(fn){ app.context = function(obj){ var ctx = this.Context.prototype; - Object.getOwnPropertyNames(obj).forEach(function(name){ + var names = Object.getOwnPropertyNames(obj); + + debug('context: %j', names); + names.forEach(function(name){ var descriptor = Object.getOwnPropertyDescriptor(obj, name); Object.defineProperty(ctx, name, descriptor); }); + return this; };