shelving 1.258.9 → 1.258.10

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.
@@ -96,7 +96,7 @@ export class EndpointCache {
96
96
  * @example await cache.refresh({ id: "abc" })
97
97
  * @see https://shelving.cc/api/EndpointCache/refresh
98
98
  */
99
- async refresh(payload, maxAge, caller = this.invalidate) {
99
+ async refresh(payload, maxAge, caller = this.refresh) {
100
100
  await this.get(payload, caller)?.refresh(maxAge);
101
101
  }
102
102
  /**
@@ -97,7 +97,7 @@ export class QueryStore extends FetchStore {
97
97
  provider: this.provider,
98
98
  collection: this.collection.name,
99
99
  query: this.query,
100
- caller: getGetter(this, "first"),
100
+ caller: getGetter(this, "last"),
101
101
  });
102
102
  return last;
103
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shelving",
3
- "version": "1.258.9",
3
+ "version": "1.258.10",
4
4
  "author": "Dave Houlbrooke <dave@shax.com>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -103,7 +103,7 @@ export declare class URLStore extends BusyStore<ImmutableURL, PossibleURL> {
103
103
  * @example store.requireParam("page");
104
104
  * @see https://shelving.cc/store/URLStore/requireParam
105
105
  */
106
- requireParam(key: string): string | undefined;
106
+ requireParam(key: string): string;
107
107
  /**
108
108
  * Set all params in this URL (all current params are cleared first).
109
109
  *
package/util/array.js CHANGED
@@ -35,7 +35,7 @@ export function requireArray(list, min, max, caller = requireArray) {
35
35
  */
36
36
  export function isArrayItem(list, item) {
37
37
  if (isArray(list))
38
- list.includes(item);
38
+ return list.includes(item);
39
39
  for (const i of list)
40
40
  if (i === item)
41
41
  return true;