Browserify-proof railway init

This commit is contained in:
Anatoliy Chakkaev 2013-03-01 00:06:11 +07:00
parent 7b7e9d0063
commit b067100d96
1 changed files with 4 additions and 1 deletions

View File

@ -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 () {