Verified Commit 3ff0b26d authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3511186 by grimreaper: Media Library currentSelection not reset properly

(cherry picked from commit 19f88bd3)
parent 13a9b0da
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -410,7 +410,9 @@
        return;
      }
      window.addEventListener('dialog:afterclose', () => {
        Drupal.MediaLibrary.currentSelection = [];
        // This empty the array while keeping the existing array reference,
        // to keep event listeners working.
        Drupal.MediaLibrary.currentSelection.length = 0;
      });
    },
  };