diff --git a/index.js b/index.js index a986ba30..37e7b46c 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ exports.AbstractClass = require('./lib/abstract-class').AbstractClass; exports.Validatable = require('./lib/validatable').Validatable; exports.init = function (rw) { - if (global.railway) { + if (typeof rw === 'string') { railway.orm = exports; } else { rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass}; diff --git a/package.json b/package.json index 06a5a7f6..52e5198f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jugglingdb", "description": "ORM for every database: redis, mysql, neo4j, mongodb, postgres, sqlite", - "version": "0.1.26", + "version": "0.1.27", "author": "Anatoliy Chakkaev ", "contributors": [ { "name": "Anatoliy Chakkaev", "email": "rpm1602@gmail.com" },