Skip to content

Commit a3f3ce0

Browse files
author
Beau Roberts
committed
Fix failing test
object-assign not available in webpack-1
1 parent f9e8daf commit a3f3ce0

File tree

1 file changed

+6
-2
lines changed
  • test/cases/loaders/issue-2299/loader

1 file changed

+6
-2
lines changed

test/cases/loaders/issue-2299/loader/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
var path = require('path');
22
var async = require('async');
3-
var assign = require('object-assign');
43
module.exports = function(content) {
54
var cb = this.async();
65
var json = JSON.parse(content);
@@ -20,7 +19,12 @@ module.exports = function(content) {
2019
}
2120
// Combine all the results into one object and return it
2221
cb(null, 'module.exports = ' + JSON.stringify(results.reduce(function(prev, result) {
23-
return assign({}, prev, result);
22+
for (var key in result) {
23+
if (result.hasOwnProperty(key)) {
24+
prev[key] = result[key];
25+
}
26+
}
27+
return prev;
2428
}, json)));
2529
}
2630
);

0 commit comments

Comments
 (0)