nuxt-custom-fetch 4.0.0-alpha.1 → 4.0.0-alpha.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.
@@ -135,6 +135,7 @@ export class CustomFetch {
135
135
  const controller = typeof AbortController !== "undefined" ? new AbortController() : {};
136
136
  if (import.meta.client) {
137
137
  const _ref = options.deep ? ref : shallowRef;
138
+ options.default ??= () => asyncDataDefaults.value;
138
139
  const asyncData = {
139
140
  data: _ref(null),
140
141
  error: _ref(null),
@@ -167,7 +168,7 @@ export class CustomFetch {
167
168
  return asyncData;
168
169
  }).catch((error) => {
169
170
  asyncData.error.value = createError(error);
170
- asyncData.data.value = unref(options?.default());
171
+ asyncData.data.value = unref(options.default());
171
172
  asyncData.status.value = "error";
172
173
  return asyncData;
173
174
  }).finally(() => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-custom-fetch",
3
3
  "type": "module",
4
- "version": "4.0.0-alpha.1",
4
+ "version": "4.0.0-alpha.2",
5
5
  "packageManager": "pnpm@8.15.3+sha1.64838798f519c18029c1e8a1310e16101fc2eda0",
6
6
  "license": "MIT",
7
7
  "repository": {