From 6c6ce992aafb9ca59c448e8cb26dd419e2b8dc46 Mon Sep 17 00:00:00 2001 From: Nate Smith Date: Tue, 11 Nov 2014 22:24:11 -0800 Subject: [PATCH] don't inherit Page from global anymore not needed with simplified lookup of controller functions in derby-templates that just looks up on current controller, page, and global --- lib/Page.js | 7 ------- package.json | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/Page.js b/lib/Page.js index a4b11b3b6..584429930 100644 --- a/lib/Page.js +++ b/lib/Page.js @@ -23,13 +23,6 @@ function Page(app, model, req, res) { this._addListeners(); } -// Inherit from the global object so that global functions and constructors are -// available for use as template helpers. -// -// It's important that the page controller doesn't have a parent, since this -// could cause an infinite loop in controller function lookup -Page.prototype = Object.create(global, {parent: {value: null}}); - util.mergeInto(Page.prototype, Controller.prototype); Page.prototype.$bodyClass = function(ns) { diff --git a/package.json b/package.json index 0d46fa137..1e3025835 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "test": "./node_modules/.bin/mocha test/*.mocha.js; ./node_modules/.bin/jshint lib/*.js test/*.js" }, "dependencies": { - "derby-parsing": "^0.2.0", - "derby-templates": "^0.1.7", + "derby-parsing": "^0.2.2", + "derby-templates": "^0.1.13", "html-util": "~0.2.1", "tracks": "^0.5.0", "racer": "0.6.0-alpha24",