@ciwergrp/nuxid 1.17.1 → 1.17.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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ciwergrp/nuxid",
3
3
  "configKey": "nuxid",
4
- "version": "1.17.1",
4
+ "version": "1.17.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -69,7 +69,7 @@ export async function useCursorHttp(url, options) {
69
69
  const hasNextPage = ref(true);
70
70
  const isLoadMoreTriggered = ref(false);
71
71
  const currentParams = shallowRef(
72
- unwrapReactiveObject(fetchOptions)
72
+ unwrapReactiveObject(fetchOptions) ?? {}
73
73
  );
74
74
  let pollTimer = null;
75
75
  let fetchPromise = null;
@@ -158,10 +158,14 @@ export async function useCursorHttp(url, options) {
158
158
  return;
159
159
  }
160
160
  isLoadMoreTriggered.value = true;
161
+ const baseParams = currentParams.value ?? {};
161
162
  const params = nextCursor.value ? {
162
- ...currentParams.value,
163
- query: { ...currentParams.value?.query, [resolvedCursorParam]: nextCursor.value }
164
- } : currentParams.value;
163
+ ...baseParams,
164
+ query: {
165
+ ...baseParams.query ?? {},
166
+ [resolvedCursorParam]: nextCursor.value
167
+ }
168
+ } : baseParams;
165
169
  await fetchData(initialUrl, params);
166
170
  };
167
171
  const refresh = async () => {
@@ -182,7 +186,7 @@ export async function useCursorHttp(url, options) {
182
186
  watch(
183
187
  reactiveSources,
184
188
  () => {
185
- currentParams.value = unwrapReactiveObject(fetchOptions);
189
+ currentParams.value = unwrapReactiveObject(fetchOptions) ?? {};
186
190
  refresh();
187
191
  },
188
192
  { flush: "sync" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciwergrp/nuxid",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "description": "All-in-one essential modules for Nuxt",
5
5
  "repository": {
6
6
  "type": "git",