From 5c82b004520b7cc089544153e8b8864cc6fd1264 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Mon, 30 Oct 2023 16:29:28 -0700 Subject: [PATCH] fix(NcActions): Detect navigation menu links correctly Signed-off-by: Christopher Ng --- src/components/NcActions/NcActions.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/NcActions/NcActions.vue b/src/components/NcActions/NcActions.vue index d5090c39f5..929d3c4d93 100644 --- a/src/components/NcActions/NcActions.vue +++ b/src/components/NcActions/NcActions.vue @@ -979,9 +979,11 @@ export default { const isNavLink = (action) => { const componentName = action?.componentOptions?.Ctor?.extendOptions?.name ?? action?.componentOptions?.tag + const href = action?.componentOptions?.propsData?.href return ( componentName === 'NcActionLink' - && action?.componentOptions?.propsData?.href?.startsWith(window.location.origin) + && !href?.startsWith('#') + && new URL(href, window.location.origin).origin === window.location.origin ) } // Automatically detect whether all actions are website navigation links