File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ export default class PageContext extends ContentFeature {
381381
382382 startObserving ( ) {
383383 this . log . info ( 'Starting observing' , this . mutationObserver , this . #cachedContent) ;
384- if ( this . mutationObserver && this . #cachedContent && ! this . isObserving ) {
384+ if ( this . mutationObserver && this . #cachedContent && ! this . isObserving && document . body ) {
385385 this . isObserving = true ;
386386 this . mutationObserver . observe ( document . body , {
387387 childList : true ,
@@ -445,7 +445,9 @@ export default class PageContext extends ContentFeature {
445445 }
446446
447447 // Cache the result - setter handles timestamp and observer
448- this . cachedContent = content ;
448+ if ( content . content . length > 0 ) {
449+ this . cachedContent = content ;
450+ }
449451 return content ;
450452 }
451453
You can’t perform that action at this time.
0 commit comments