Explorar el Código

:recycle: trying to catch intersection load error

tags/0.9.0
J hace 4 años
padre
commit
4bae794244
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      vue-theme/src/pages/list.vue

+ 3
- 1
vue-theme/src/pages/list.vue Ver fichero

@@ -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…
Cancelar
Guardar