@hybridly/core 0.7.9 → 0.7.10
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 +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -839,7 +839,7 @@ async function performHybridNavigation(options) {
|
|
|
839
839
|
}
|
|
840
840
|
utils.debug.router("The response respects the Hybridly protocol.");
|
|
841
841
|
const payload = response.data;
|
|
842
|
-
if ((options.only?.length ?? options.except?.length) && payload.view.component === context.view.component) {
|
|
842
|
+
if (payload.view && (options.only?.length ?? options.except?.length) && payload.view.component === context.view.component) {
|
|
843
843
|
utils.debug.router(`Merging ${options.only ? '"only"' : '"except"'} properties.`, payload.view.properties);
|
|
844
844
|
payload.view.properties = utils.merge(context.view.properties, payload.view.properties);
|
|
845
845
|
utils.debug.router("Merged properties:", payload.view.properties);
|
|
@@ -928,11 +928,13 @@ function isHybridResponse(response) {
|
|
|
928
928
|
return !!response?.headers[HYBRIDLY_HEADER];
|
|
929
929
|
}
|
|
930
930
|
async function navigate(options) {
|
|
931
|
+
var _a;
|
|
931
932
|
const context = getRouterContext();
|
|
932
933
|
options.hasDialog ?? (options.hasDialog = !!options.payload?.dialog);
|
|
933
934
|
utils.debug.router("Making an internal navigation:", { context, options });
|
|
934
935
|
await runHooks("navigating", {}, options, context);
|
|
935
936
|
options.payload ?? (options.payload = payloadFromContext());
|
|
937
|
+
(_a = options.payload).view ?? (_a.view = payloadFromContext().view);
|
|
936
938
|
function evaluateConditionalOption(option) {
|
|
937
939
|
return typeof option === "function" ? option(options) : option;
|
|
938
940
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -832,7 +832,7 @@ async function performHybridNavigation(options) {
|
|
|
832
832
|
}
|
|
833
833
|
debug.router("The response respects the Hybridly protocol.");
|
|
834
834
|
const payload = response.data;
|
|
835
|
-
if ((options.only?.length ?? options.except?.length) && payload.view.component === context.view.component) {
|
|
835
|
+
if (payload.view && (options.only?.length ?? options.except?.length) && payload.view.component === context.view.component) {
|
|
836
836
|
debug.router(`Merging ${options.only ? '"only"' : '"except"'} properties.`, payload.view.properties);
|
|
837
837
|
payload.view.properties = merge(context.view.properties, payload.view.properties);
|
|
838
838
|
debug.router("Merged properties:", payload.view.properties);
|
|
@@ -921,11 +921,13 @@ function isHybridResponse(response) {
|
|
|
921
921
|
return !!response?.headers[HYBRIDLY_HEADER];
|
|
922
922
|
}
|
|
923
923
|
async function navigate(options) {
|
|
924
|
+
var _a;
|
|
924
925
|
const context = getRouterContext();
|
|
925
926
|
options.hasDialog ?? (options.hasDialog = !!options.payload?.dialog);
|
|
926
927
|
debug.router("Making an internal navigation:", { context, options });
|
|
927
928
|
await runHooks("navigating", {}, options, context);
|
|
928
929
|
options.payload ?? (options.payload = payloadFromContext());
|
|
930
|
+
(_a = options.payload).view ?? (_a.view = payloadFromContext().view);
|
|
929
931
|
function evaluateConditionalOption(option) {
|
|
930
932
|
return typeof option === "function" ? option(options) : option;
|
|
931
933
|
}
|
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.10",
|
|
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.10"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"defu": "^6.1.4"
|