@schukai/monster 3.100.1 → 3.100.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
 
4
4
 
5
+ ## [3.100.2] - 2025-01-13
6
+
7
+ ### Bug Fixes
8
+
9
+ - **filter:** check against null
10
+
11
+
12
+
5
13
  ## [3.100.1] - 2025-01-12
6
14
 
7
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.1"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.2"}
@@ -343,7 +343,7 @@ class Rest extends Datasource {
343
343
  }
344
344
 
345
345
  /**
346
- * Fetches the data from the rest api.
346
+ * Writes the data to the rest api.
347
347
  * @return {Promise}
348
348
  */
349
349
  write() {
@@ -426,12 +426,12 @@ function initFilter() {
426
426
 
427
427
  this[filterObserverSymbol] = new Observer(() => {
428
428
  const query = filterControl.getOption("query");
429
- if (query === undefined) {
429
+ if (query === undefined || query === null) {
430
430
  return;
431
431
  }
432
432
 
433
433
  this.setParameters({ query: query });
434
- this.fetch()
434
+ this.read()
435
435
  .then((response) => {
436
436
  if (!(response instanceof Response)) {
437
437
  return Promise.reject(new Error("response is not a Response object"));
@@ -536,7 +536,7 @@ function initAutoInit() {
536
536
  }
537
537
 
538
538
  queueMicrotask(() => {
539
- this.fetch().catch(() => {});
539
+ this.read().catch(() => {});
540
540
  });
541
541
  }
542
542
 
@@ -548,7 +548,7 @@ function initEventHandler() {
548
548
  entries.forEach((entry) => {
549
549
  if (entry.isIntersecting) {
550
550
  if (entry.intersectionRatio > 0) {
551
- this.fetch();
551
+ this.read();
552
552
  }
553
553
 
554
554
  // only load once