Skip to content

Commit

Permalink
fix: try fix for old node
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed Dec 27, 2017
1 parent 7277faf commit 3086a08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

var htmlparser = require('htmlparser2');
var isObject = require('isobject');
var objectAssign = require('object-assign');

/**
* @see https://github.com/fb55/htmlparser2/wiki/Parser-options
Expand Down Expand Up @@ -49,7 +50,7 @@ function postHTMLParser(html, options) {
Object.keys(attrs).forEach(function(key) {
var obj = {};
obj[key] = attrs[key].replace(/"/g, '"');
Object.assign(result, obj);
objectAssign(result, obj);
});

return result;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"homepage": "https://github.com/posthtml/posthtml-parser#readme",
"dependencies": {
"htmlparser2": "^3.9.2",
"isobject": "^2.1.0"
"isobject": "^2.1.0",
"object-assign": "^4.1.1"
},
"devDependencies": {
"chai": "^3.3.0",
Expand Down

0 comments on commit 3086a08

Please sign in to comment.