From 55cfb21b462625cc89e890d2c878ba5fa8f631ad Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 23 Jul 2023 02:49:45 +0300 Subject: [PATCH] fix console error --- files/assets/js/pwa_pulltorefresh.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/assets/js/pwa_pulltorefresh.js b/files/assets/js/pwa_pulltorefresh.js index 7e0334b71..6c9eb76d0 100644 --- a/files/assets/js/pwa_pulltorefresh.js +++ b/files/assets/js/pwa_pulltorefresh.js @@ -15,5 +15,6 @@ if (standalone) { img.setAttribute("src", window.scrollY < threshold ? thresholdImg : defaultImg); }); } else { - document.getElementById("pulltorefresh").remove(); + const pulltorefresh = document.getElementById("pulltorefresh") + if (pulltorefresh) pulltorefresh.remove(); }