Closed kuleyu closed 4 years ago
Just tried a fresh deploy and am getting the same issue. Any updates?
I solved this by moving this.observer.disconnect()
and this.$nextTick(this.initObserver)
into if (process.isClient)
.
IntersectionObserver
is a browser API and should not be used during rendering.
watch: {
$route: function () {
if (process.isClient) {
if (window.location.hash) this.activeAnchor = window.location.hash
// Clear the current observer.
this.observer.disconnect()
// And create another one for the next page.
this.$nextTick(this.initObserver)
}
}
}
@exuanbo Thanks, it's usefull.
Hello, there is an error happened when building.
Error:
TypeError: Cannot read property 'disconnect' of null
Details:
Influence: almost none. the building process finished normally, and the site worked normally.
The
disconnect
seems from the file./src/components/OnThisPage.vue
, line 65:this.observer.disconnect();
.some solutions?