1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Remove the addWindowResolutionChange listener unconditionally (PR 17767 follow-up)

Given that `PDFViewerApplication.unbindWindowEvents` can be invoked in mozilla-central tests, we should ensure that the listener is always removed.
This commit is contained in:
Jonas Jenwald 2024-04-01 15:55:55 +02:00
parent 3d2eb36e27
commit 0fdea4b05c

View file

@ -1915,9 +1915,6 @@ const PDFViewerApplication = {
once: true,
});
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
return;
}
_boundEvents.removeWindowResolutionChange ||= function () {
mediaQueryList.removeEventListener("change", addWindowResolutionChange);
_boundEvents.removeWindowResolutionChange = null;