From 46d49750e4b32baf536fafeb2e401dfedd630623 Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Tue, 24 Jan 2017 21:59:11 -0400 Subject: [PATCH] See #1432. Improves JS-Beautify beautifier so it will throw error when missing language See #1458, #1471, #1483, #136, #1452 --- src/beautifiers/js-beautify.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/beautifiers/js-beautify.coffee b/src/beautifiers/js-beautify.coffee index 7092e23..902a86f 100644 --- a/src/beautifiers/js-beautify.coffee +++ b/src/beautifiers/js-beautify.coffee @@ -53,6 +53,8 @@ module.exports = class JSBeautify extends Beautifier beautifyCSS = require("js-beautify").css text = beautifyCSS(text, options) resolve text + else + reject(new Error("Unknown language for JS Beautify: "+language)) catch err @error("JS Beautify error: #{err}") reject(err)