@hybridly/core 0.7.6 → 0.7.7
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/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -785,10 +785,10 @@ async function performHybridNavigation(options) {
|
|
|
785
785
|
utils.debug.router(`Automatically spoofing method ${options.method}.`);
|
|
786
786
|
if (options.data instanceof FormData) {
|
|
787
787
|
options.data.append("_method", options.method);
|
|
788
|
-
} else if (Object.keys(options.data ?? {}).length >= 0) {
|
|
789
|
-
Object.assign(options.data, { _method: options.method });
|
|
790
788
|
} else if (typeof options.data === "undefined") {
|
|
791
789
|
options.data = { _method: options.method };
|
|
790
|
+
} else if (options.data instanceof Object && Object.keys(options.data).length >= 0) {
|
|
791
|
+
Object.assign(options.data, { _method: options.method });
|
|
792
792
|
} else {
|
|
793
793
|
utils.debug.router("Could not spoof method because body type is not supported.", options.data);
|
|
794
794
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -778,10 +778,10 @@ async function performHybridNavigation(options) {
|
|
|
778
778
|
debug.router(`Automatically spoofing method ${options.method}.`);
|
|
779
779
|
if (options.data instanceof FormData) {
|
|
780
780
|
options.data.append("_method", options.method);
|
|
781
|
-
} else if (Object.keys(options.data ?? {}).length >= 0) {
|
|
782
|
-
Object.assign(options.data, { _method: options.method });
|
|
783
781
|
} else if (typeof options.data === "undefined") {
|
|
784
782
|
options.data = { _method: options.method };
|
|
783
|
+
} else if (options.data instanceof Object && Object.keys(options.data).length >= 0) {
|
|
784
|
+
Object.assign(options.data, { _method: options.method });
|
|
785
785
|
} else {
|
|
786
786
|
debug.router("Could not spoof method because body type is not supported.", options.data);
|
|
787
787
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hybridly/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "Core functionality of Hybridly",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hybridly",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"qs": "^6.12.1",
|
|
45
45
|
"superjson": "^2.2.1",
|
|
46
|
-
"@hybridly/utils": "0.7.
|
|
46
|
+
"@hybridly/utils": "0.7.7"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"defu": "^6.1.4"
|