From df367e074993b651e18e8bc175e6d4e9173c631e Mon Sep 17 00:00:00 2001 From: Jonathan Ong Date: Sat, 5 Oct 2013 12:56:36 -0700 Subject: [PATCH] debug: notify if a property is being overwritten --- lib/application.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/application.js b/lib/application.js index 34398a5..3e48a18 100644 --- a/lib/application.js +++ b/lib/application.js @@ -106,6 +106,9 @@ app.context = function(obj){ debug('context: %j', names); names.forEach(function(name){ + if (Object.getOwnPropertyDescriptor(ctx, name)) { + debug('context: overwriting %j', name); + } var descriptor = Object.getOwnPropertyDescriptor(obj, name); Object.defineProperty(ctx, name, descriptor); });