@inertiajs/svelte 1.0.13 → 1.0.15
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/package.json +2 -2
- package/src/useForm.js +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inertiajs/svelte",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Svelte adapter for Inertia.js",
|
|
6
6
|
"contributors": [
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"svelte": "^3.20.0 || ^4.0.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@inertiajs/core": "1.0.
|
|
31
|
+
"@inertiajs/core": "1.0.15",
|
|
32
32
|
"lodash.clonedeep": "^4.5.0",
|
|
33
33
|
"lodash.isequal": "^4.5.0"
|
|
34
34
|
}
|
package/src/useForm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { router } from '@inertiajs/core'
|
|
2
|
-
import cloneDeep from 'lodash.clonedeep'
|
|
3
2
|
import isEqual from 'lodash.isequal'
|
|
3
|
+
import cloneDeep from 'lodash.clonedeep'
|
|
4
4
|
import { writable } from 'svelte/store'
|
|
5
5
|
|
|
6
6
|
function useForm(...args) {
|
|
@@ -52,7 +52,6 @@ function useForm(...args) {
|
|
|
52
52
|
let clonedDefaults = cloneDeep(defaults)
|
|
53
53
|
if (fields.length === 0) {
|
|
54
54
|
this.setStore(clonedDefaults)
|
|
55
|
-
this.clearErrors()
|
|
56
55
|
} else {
|
|
57
56
|
this.setStore(
|
|
58
57
|
Object.keys(clonedDefaults)
|
|
@@ -62,7 +61,6 @@ function useForm(...args) {
|
|
|
62
61
|
return carry
|
|
63
62
|
}, {}),
|
|
64
63
|
)
|
|
65
|
-
this.clearErrors(...fields)
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
return this
|