See #1432. Improves JS-Beautify beautifier so it will throw error when missing language

See #1458, #1471, #1483, #136, #1452
This commit is contained in:
Glavin Wiechert 2017-01-24 21:59:11 -04:00
parent d091570860
commit 46d49750e4
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,8 @@ module.exports = class JSBeautify extends Beautifier
beautifyCSS = require("js-beautify").css beautifyCSS = require("js-beautify").css
text = beautifyCSS(text, options) text = beautifyCSS(text, options)
resolve text resolve text
else
reject(new Error("Unknown language for JS Beautify: "+language))
catch err catch err
@error("JS Beautify error: #{err}") @error("JS Beautify error: #{err}")
reject(err) reject(err)