File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -181,16 +181,18 @@ class QueryRenderChild extends MarkdownRenderChild {
181
181
182
182
// entry describes a single visibility change for the specific element we are observing.
183
183
// It is safe to assume `entry.target === this.containerEl` here.
184
- if ( entry . isIntersecting ) {
185
- this . queryResultsRenderer . query . debug (
186
- `[render][observer] Became visible, isCacheChangedSinceLastRedraw:${ this . isCacheChangedSinceLastRedraw } ` ,
187
- ) ;
188
- if ( this . isCacheChangedSinceLastRedraw ) {
189
- this . queryResultsRenderer . query . debug ( '[render][observer] ... updating search results' ) ;
190
- this . render ( { tasks : this . plugin . getTasks ( ) , state : this . plugin . getState ( ) } )
191
- . then ( )
192
- . catch ( ( e ) => console . error ( e ) ) ;
193
- }
184
+ if ( ! entry . isIntersecting ) {
185
+ return ;
186
+ }
187
+
188
+ this . queryResultsRenderer . query . debug (
189
+ `[render][observer] Became visible, isCacheChangedSinceLastRedraw:${ this . isCacheChangedSinceLastRedraw } ` ,
190
+ ) ;
191
+ if ( this . isCacheChangedSinceLastRedraw ) {
192
+ this . queryResultsRenderer . query . debug ( '[render][observer] ... updating search results' ) ;
193
+ this . render ( { tasks : this . plugin . getTasks ( ) , state : this . plugin . getState ( ) } )
194
+ . then ( )
195
+ . catch ( ( e ) => console . error ( e ) ) ;
194
196
}
195
197
} ) ;
196
198
You can’t perform that action at this time.
0 commit comments