Skip to content

Commit 3086a08

Browse files
committed
fix: try fix for old node
1 parent 7277faf commit 3086a08

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
var htmlparser = require('htmlparser2');
44
var isObject = require('isobject');
5+
var objectAssign = require('object-assign');
56

67
/**
78
* @see https://github.com/fb55/htmlparser2/wiki/Parser-options
@@ -49,7 +50,7 @@ function postHTMLParser(html, options) {
4950
Object.keys(attrs).forEach(function(key) {
5051
var obj = {};
5152
obj[key] = attrs[key].replace(/"/g, '"');
52-
Object.assign(result, obj);
53+
objectAssign(result, obj);
5354
});
5455

5556
return result;

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"homepage": "https://github.com/posthtml/posthtml-parser#readme",
2727
"dependencies": {
2828
"htmlparser2": "^3.9.2",
29-
"isobject": "^2.1.0"
29+
"isobject": "^2.1.0",
30+
"object-assign": "^4.1.1"
3031
},
3132
"devDependencies": {
3233
"chai": "^3.3.0",

0 commit comments

Comments
 (0)