JSON Beautify and Minify operations no longer throw an error on empty input. Fixes #29

This commit is contained in:
n1474335 2016-12-03 00:51:17 +00:00
parent 19b0a972d8
commit fc9d0a63c2
5 changed files with 12 additions and 10 deletions

View file

@ -64,6 +64,7 @@ var Code = {
*/
run_json_beautify: function(input, args) {
var indent_str = args[0];
if (!input) return "";
return vkbeautify.json(input, indent_str);
},
@ -121,6 +122,7 @@ var Code = {
* @returns {string}
*/
run_json_minify: function(input, args) {
if (!input) return "";
return vkbeautify.jsonmin(input);
},