Sfoglia il codice sorgente

Do nothing if input is empty for removeEXIF operation

David Moodie 8 anni fa
parent
commit
cbcd45cd70
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/core/operations/Image.js

+ 3 - 0
src/core/operations/Image.js

@@ -55,6 +55,9 @@ const Image = {
      * @returns {string}
      */
     removeEXIF(input, args) {
+        // Do nothing if input is empty
+        if (input.length === 0) return input;
+
         try {
             return removeEXIF(input);
         } catch (err) {