瀏覽代碼

Do nothing if input is empty for removeEXIF operation

David Moodie 8 年之前
父節點
當前提交
cbcd45cd70
共有 1 個文件被更改,包括 3 次插入0 次删除
  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) {