Sfoglia il codice sorgente

:recycle: trying to catch intersection load error

tags/0.9.0
J 4 anni fa
parent
commit
4bae794244
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3
    1
      vue-theme/src/pages/list.vue

+ 3
- 1
vue-theme/src/pages/list.vue Vedi File

@@ -173,9 +173,11 @@ export default {
173 173
             }, TIMEOUT)
174 174
         },
175 175
         setIntersectionLoader() {
176
+            console.warn('setting up intersection handler...')
176 177
             window.removeEventListener("load", e => {}, false)
178
+            const footerEl = document.querySelector(".footer-wrapper footer")
179
+            if(!footerEl) return
177 180
             window.addEventListener("load", e => {
178
-                const footerEl = document.querySelector(".footer-wrapper footer")
179 181
                 const observer = new IntersectionObserver(this.loadMorePosts, {
180 182
                     rootMargin: "0px 0px 20px 0px",
181 183
                 })

Loading…
Annulla
Salva