svelte-reflector 1.0.35 → 1.0.36

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.
Files changed (2) hide show
  1. package/dist/method.js +3 -1
  2. package/package.json +1 -1
package/dist/method.js CHANGED
@@ -114,7 +114,7 @@ export class Method {
114
114
  if (hasHeaders) {
115
115
  headers = `const headers = this.headers.bundle()`;
116
116
  }
117
- const outside = ["this.loading = true", data, headers].join("\n");
117
+ const outside = [data, headers].join("\n");
118
118
  const inside = `
119
119
  const response = await api.${this.request.apiType}<${responseType}>({
120
120
  endpoint,
@@ -179,6 +179,8 @@ export class Method {
179
179
  ${description}
180
180
  async ${this.name}(behavior: Behavior<${this.responseTypeInterface}> = new Behavior()) {
181
181
  const {onError, onSuccess} = behavior
182
+
183
+ this.loading = true
182
184
  ${this.getProps()}
183
185
  const endpoint = ${endpoint}
184
186
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-reflector",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "Reflects zod types from openAPI schemas",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",