Skip to content

Commit 3dad76a

Browse files
committed
fix(js-beautify): Use correct type for javascript filetype.
Fixes #95.
1 parent 8bae55b commit 3dad76a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

autoload/codefmt/jsbeautify.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ function! codefmt#jsbeautify#GetFormatter() abort
4141
" @throws ShellError
4242
function l:formatter.FormatRange(startline, endline) abort
4343
let l:cmd = [s:plugin.Flag('js_beautify_executable'), '-f', '-']
44-
if &filetype != ""
44+
if &filetype is# 'javascript'
45+
let l:cmd = l:cmd + ['--type', 'js']
46+
elseif &filetype != ""
4547
let l:cmd = l:cmd + ['--type', &filetype]
4648
endif
4749

0 commit comments

Comments
 (0)