소스 검색

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) {