Skip to content

Commit

Permalink
fix snapshot test by not importing side-nav-item
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki committed Feb 16, 2024
1 parent 8ca868f commit 5339075
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/side-nav/src/vaadin-side-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js'
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import { sideNavBaseStyles } from './vaadin-side-nav-base-styles.js';
import { SideNavChildrenMixin } from './vaadin-side-nav-children-mixin.js';
import { SideNavItem } from './vaadin-side-nav-item.js';

/**
* `<vaadin-side-nav>` is a Web Component for navigation menus.
Expand Down Expand Up @@ -268,7 +267,7 @@ class SideNav extends SideNavChildrenMixin(FocusMixin(ElementMixin(ThemableMixin
}

const composedPath = e.composedPath();
const item = composedPath.find((el) => el instanceof SideNavItem);
const item = composedPath.find((el) => el.localName && el.localName.includes('side-nav-item'));
const anchor = composedPath.find((el) => el instanceof HTMLAnchorElement);
if (!item || !item.shadowRoot.contains(anchor)) {
// Not a click on a side-nav-item anchor
Expand Down

0 comments on commit 5339075

Please sign in to comment.