Skip to content

Commit

Permalink
Fix shift on non-array
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Nowrotek committed Dec 9, 2018
1 parent 7c98045 commit e951d85
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/HTMLDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ module.exports = class HTMLDocument extends Document {
return element;
}
get body() {
return this.getElementsByTagName('body').shift();
return this.getElementsByTagName('body')[0];
}
};
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "htmldom2",
"version": "0.0.3",
"version": "0.0.4",
"description": "Parse html on top of xmldom and htmlparser2",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit e951d85

Please sign in to comment.