Skip to content

Commit

Permalink
Merge branch 'sequelize-promise' of https://github.com/schmod/sequeli…
Browse files Browse the repository at this point in the history
…ze-fixtures into schmod-sequelize-promise
  • Loading branch information
domasx2 committed Jan 13, 2019
2 parents 7d6d4b6 + c2fb6b8 commit 78606f1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions lib/Promise.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var Promise;
try {
Promise = require('sequelize').Promise;
if (!Promise) throw new Error();
} catch (err) {
Promise = require('bluebird');
}

module.exports = Promise;
2 changes: 1 addition & 1 deletion lib/loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Promise = require('bluebird');
var Promise = require('./Promise');
var objectAssign = require('object-assign');
var Op = require('sequelize').Op;

Expand Down
2 changes: 1 addition & 1 deletion lib/reader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Promise = require('bluebird'),
var Promise = require('./Promise'),
path = require('path'),
yaml = require('js-yaml'),
glob = Promise.promisify(require('glob')),
Expand Down

0 comments on commit 78606f1

Please sign in to comment.