Bladeren bron

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

n1474335 8 jaren geleden
bovenliggende
commit
fc9d0a63c2
5 gewijzigde bestanden met toevoegingen van 5 en 3 verwijderingen
  1. 0 0
      build/prod/cyberchef.htm
  2. 0 0
      build/prod/index.html
  3. 0 0
      build/prod/scripts.js
  4. 2 0
      src/js/operations/Code.js
  5. 3 3
      src/static/stats.txt

File diff suppressed because it is too large
+ 0 - 0
build/prod/cyberchef.htm


File diff suppressed because it is too large
+ 0 - 0
build/prod/index.html


File diff suppressed because it is too large
+ 0 - 0
build/prod/scripts.js


+ 2 - 0
src/js/operations/Code.js

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

+ 3 - 3
src/static/stats.txt

@@ -1,9 +1,9 @@
 203	source files
 203	source files
-104209	lines
+104211	lines
 4.0M	size
 4.0M	size
 
 
 136	JavaScript source files
 136	JavaScript source files
-95119	lines
+95121	lines
 3.4M	size
 3.4M	size
 
 
 78	third party JavaScript source files
 78	third party JavaScript source files
@@ -11,7 +11,7 @@
 2.7M	size
 2.7M	size
 
 
 58	first party JavaScript source files
 58	first party JavaScript source files
-18742	lines
+18744	lines
 724K	size
 724K	size
 
 
 3.1M	uncompressed JavaScript size
 3.1M	uncompressed JavaScript size

Some files were not shown because too many files changed in this diff