From 9498ff9866808f64ae65a57df10752426d2e3135 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sun, 26 Apr 2020 18:29:21 +1000 Subject: [PATCH] Fix file input bug for the same file twice --- src/modals/SelectMapModal.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modals/SelectMapModal.js b/src/modals/SelectMapModal.js index 02b05fd..ea4a382 100644 --- a/src/modals/SelectMapModal.js +++ b/src/modals/SelectMapModal.js @@ -149,6 +149,8 @@ function SelectMapModal({ URL.revokeObjectURL(url); }; image.src = url; + // Set file input to null to allow adding the same image 2 times in a row + fileInputRef.current.value = null; } function openImageDialog() {