Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions injected/src/features/page-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export default class PageContext extends ContentFeature {

startObserving() {
this.log.info('Starting observing', this.mutationObserver, this.#cachedContent);
if (this.mutationObserver && this.#cachedContent && !this.isObserving) {
if (this.mutationObserver && this.#cachedContent && !this.isObserving && document.body) {
this.isObserving = true;
this.mutationObserver.observe(document.body, {
childList: true,
Expand Down Expand Up @@ -445,7 +445,9 @@ export default class PageContext extends ContentFeature {
}

// Cache the result - setter handles timestamp and observer
this.cachedContent = content;
if (content.content.length > 0) {
this.cachedContent = content;
}
return content;
}

Expand Down
Loading