Skip to content

Commit 3e029fc

Browse files
janwerkhoventonyganch
authored andcommitted
Fix ast.remove is not a function error
This PR fixes an error that occurs when `"eof-newline": false,` as reported and solved here: Glavin001/atom-beautify#1705
1 parent 55d58f4 commit 3e029fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/options/block-indent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ let option = {
4545
var spaces = whitespaceNode.content.replace(/\n[ \t]+/gm, '\n');
4646

4747
if (spaces === '') {
48-
ast.remove(i);
48+
ast.removeChild(i);
4949
} else {
5050
whitespaceNode.content = spaces;
5151
}

0 commit comments

Comments
 (0)