Skip to content
Snippets Groups Projects
Verified Commit 8eb4982d authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix(filter): check against null

parent a92bf1f8
No related branches found
No related tags found
No related merge requests found
......@@ -343,7 +343,7 @@ class Rest extends Datasource {
}
/**
* Fetches the data from the rest api.
* Writes the data to the rest api.
* @return {Promise}
*/
write() {
......@@ -426,12 +426,12 @@ function initFilter() {
this[filterObserverSymbol] = new Observer(() => {
const query = filterControl.getOption("query");
if (query === undefined) {
if (query === undefined || query === null) {
return;
}
this.setParameters({ query: query });
this.fetch()
this.read()
.then((response) => {
if (!(response instanceof Response)) {
return Promise.reject(new Error("response is not a Response object"));
......@@ -536,7 +536,7 @@ function initAutoInit() {
}
queueMicrotask(() => {
this.fetch().catch(() => {});
this.read().catch(() => {});
});
}
......@@ -548,7 +548,7 @@ function initEventHandler() {
entries.forEach((entry) => {
if (entry.isIntersecting) {
if (entry.intersectionRatio > 0) {
this.fetch();
this.read();
}
// only load once
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment