Cannot read property 'query' of null
See original GitHub issueI got this error after updating from 0.1.2
to 0.1.3
.
EXCEPTION: TypeError: Cannot read property ‘query’ of null
The code is quite simple:
import { Component } from '@angular/core';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { InfiniteScroll } from 'angular2-infinite-scroll';
@Component({
selector: 'app',
directives: [InfiniteScroll],
styles: [`
.search-results {
height: 20rem;
overflow: scroll;
}
`],
template: `
Hello InfiniteScroll!
<div class="search-results"
infinite-scroll
[infiniteScrollDistance]="2"
[infiniteScrollThrottle]="500"
(scrolled)="onScroll()">
<p>1</p>
<p>2</p>
<p>3</p>
</div>
`
})
class App {
onScroll () {
console.log('scrolled!!')
}
}
bootstrap(App);
It happens after I adding this part (Without this part, no error):
<div class="search-results"
infinite-scroll
[infiniteScrollDistance]="2"
[infiniteScrollThrottle]="500"
(scrolled)="onScroll()">
<p>1</p>
<p>2</p>
<p>3</p>
</div>
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Cannot read property 'query' of null? - node.js - Stack Overflow
In your error handler here: if (err) { console.log("not able to get connection " + err); res.status(400).send(err); } client.query(...).
Read more >useRouter() error "Cannot read property 'query' of null" #11818
Within a component, I'm calling useRouter. I want to get the query param (if present) and then pass it on to Query or...
Read more >T32154 Uncaught TypeError: Cannot read property 'query' of ...
This bug doesn't seems to happen often, but I've noticed the following error after trying to ... Uncaught TypeError: Cannot read property 'query'...
Read more >cannot read properties of undefined (reading 'query') - You.com
The "Cannot read properties of undefined" error occurs for multiple reasons: Accessing a property on a variable that stores an undefined value. Accessing...
Read more >Cannot read property 'query' of null?-postgresql - appsloveworld
query ('SELECT * FROM employee WHERE empid=$1', [1], function (err, result) { done(); // closing the connection; if (err) { console.log(err); res.status(400).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fantastic, it works, thanks!
@tallkid24 @marcalj i have confirmed this - thanks! a fix will be pushed soon.