@hybridly/core 0.7.12 → 0.7.13
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 +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -842,7 +842,13 @@ async function performHybridNavigation(options) {
|
|
|
842
842
|
const payload = response.data;
|
|
843
843
|
if (payload.view && (options.only?.length ?? options.except?.length) && payload.view.component === context.view.component) {
|
|
844
844
|
utils.debug.router(`Merging ${options.only ? '"only"' : '"except"'} properties.`, payload.view.properties);
|
|
845
|
-
|
|
845
|
+
const mergedPayloadProperties = utils.merge(context.view.properties, payload.view.properties);
|
|
846
|
+
if (options.errorBag) {
|
|
847
|
+
mergedPayloadProperties.errors[options.errorBag] = payload.view.properties.errors[options.errorBag] ?? {};
|
|
848
|
+
} else {
|
|
849
|
+
mergedPayloadProperties.errors = payload.view.properties.errors;
|
|
850
|
+
}
|
|
851
|
+
payload.view.properties = mergedPayloadProperties;
|
|
846
852
|
utils.debug.router("Merged properties:", payload.view.properties);
|
|
847
853
|
}
|
|
848
854
|
await navigate({
|
package/dist/index.mjs
CHANGED
|
@@ -835,7 +835,13 @@ async function performHybridNavigation(options) {
|
|
|
835
835
|
const payload = response.data;
|
|
836
836
|
if (payload.view && (options.only?.length ?? options.except?.length) && payload.view.component === context.view.component) {
|
|
837
837
|
debug.router(`Merging ${options.only ? '"only"' : '"except"'} properties.`, payload.view.properties);
|
|
838
|
-
|
|
838
|
+
const mergedPayloadProperties = merge(context.view.properties, payload.view.properties);
|
|
839
|
+
if (options.errorBag) {
|
|
840
|
+
mergedPayloadProperties.errors[options.errorBag] = payload.view.properties.errors[options.errorBag] ?? {};
|
|
841
|
+
} else {
|
|
842
|
+
mergedPayloadProperties.errors = payload.view.properties.errors;
|
|
843
|
+
}
|
|
844
|
+
payload.view.properties = mergedPayloadProperties;
|
|
839
845
|
debug.router("Merged properties:", payload.view.properties);
|
|
840
846
|
}
|
|
841
847
|
await navigate({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hybridly/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.13",
|
|
5
5
|
"description": "Core functionality of Hybridly",
|
|
6
6
|
"author": "Enzo Innocenzi <enzo@innocenzi.dev>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -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.13"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"defu": "^6.1.4"
|