Skip to content

Commit

Permalink
Fix ast.remove is not a function error
Browse files Browse the repository at this point in the history
This PR fixes an error that occurs when `"eof-newline": false,` as reported and solved here: Glavin001/atom-beautify#1705
  • Loading branch information
janwerkhoven authored and tonyganch committed Mar 22, 2019
1 parent 55d58f4 commit 3e029fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/options/block-indent.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let option = {
var spaces = whitespaceNode.content.replace(/\n[ \t]+/gm, '\n');

if (spaces === '') {
ast.remove(i);
ast.removeChild(i);
} else {
whitespaceNode.content = spaces;
}
Expand Down

0 comments on commit 3e029fc

Please sign in to comment.