Skip to content

Commit

Permalink
sigh, fix compat issue with 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
domasx2 committed Apr 17, 2016
1 parent e43e739 commit 46de20e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
language: node_js
node_js:
- "4"
- "0.12"
- "4"
- "5"
5 changes: 3 additions & 2 deletions lib/loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var Promise = require('bluebird');
var objectAssign = require('object-assign');

var Loader = module.exports = function(options) {
this.options = options;
Expand Down Expand Up @@ -50,7 +51,7 @@ Loader.prototype.loadFixture = function(fixture, models) {
many2many[key].forEach(function(relinst) {

//make options object with transaction if any, through table attrs if any
var options = Object.assign({},
var options = objectAssign({},
self.options.transaction ? {transaction: self.options.transaction} : {},
relinst._through || {});

Expand Down Expand Up @@ -164,7 +165,7 @@ Loader.prototype.prepFixtureData = function(data, Model) {

//find by fields
if (typeof v === 'object') {
where = Object.assign({}, v);
where = objectAssign({}, v);
if (where._through) {
_through = where._through;
delete where._through;
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sequelize-fixtures",
"version": "0.5.0",
"version": "0.5.1",
"description": "sequelize fixture loader",
"main": "index.js",
"scripts": {
Expand All @@ -16,7 +16,8 @@
"dependencies": {
"bluebird": "^2.4.2",
"glob": "~3.2.1",
"js-yaml": "~2.1.0"
"js-yaml": "~2.1.0",
"object-assign": "^4.0.1"
},
"devDependencies": {
"mocha": "*",
Expand Down

0 comments on commit 46de20e

Please sign in to comment.