From bbf94dee15eeb80fbc58c29ce7eb3b9383e4c05a Mon Sep 17 00:00:00 2001 From: Dan Shultz Date: Fri, 1 Feb 2013 09:07:00 -0500 Subject: [PATCH] Fixing Railway Hoisting Issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit orm is defined on the var declared two lines below the if block and not on the expected global reference --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index cfdd1c65..d981af93 100644 --- a/index.js +++ b/index.js @@ -13,7 +13,7 @@ exports.__defineGetter__('BaseSQL', function () { exports.init = function (rw) { if (global.railway) { - railway.orm = exports; + global.railway.orm = exports; } else { rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass}; }