Browserify-proof railway init
This commit is contained in:
parent
7b7e9d0063
commit
b067100d96
5
index.js
5
index.js
|
@ -18,7 +18,10 @@ exports.init = function (rw) {
|
|||
rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass};
|
||||
}
|
||||
var railway = './lib/railway';
|
||||
require(railway)(rw);
|
||||
try {
|
||||
var init = require(railway);
|
||||
} catch (e) {}
|
||||
if (init) init(rw);
|
||||
};
|
||||
|
||||
exports.__defineGetter__('version', function () {
|
||||
|
|
Loading…
Reference in New Issue