Skip to content

Commit

Permalink
fix(NcActions): Detect navigation menu links correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Oct 30, 2023
1 parent 5c8ca37 commit 5c82b00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/NcActions/NcActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c82b00

Please sign in to comment.