Fixing Railway Hoisting Issue
orm is defined on the var declared two lines below the if block and not on the expected global reference
This commit is contained in:
parent
cdd328c902
commit
bbf94dee15
2
index.js
2
index.js
|
@ -13,7 +13,7 @@ exports.__defineGetter__('BaseSQL', function () {
|
||||||
|
|
||||||
exports.init = function (rw) {
|
exports.init = function (rw) {
|
||||||
if (global.railway) {
|
if (global.railway) {
|
||||||
railway.orm = exports;
|
global.railway.orm = exports;
|
||||||
} else {
|
} else {
|
||||||
rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass};
|
rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue