Skip to content

Commit

Permalink
fix: parentNode declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajdeep Chandra authored and Westbrook committed Aug 18, 2023
1 parent 55becc8 commit c45fdc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/tags/src/Tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export class Tag extends SizedMixin(SpectrumElement, {
return;
}
const { code } = event;

const tags = Array.from(this.parentNode.querySelectorAll('sp-tag'));
const parent = this.parentNode as HTMLElement | null;
const tags = Array.from(parent?.querySelectorAll('sp-tag') ?? []);
const currentIndex = tags.indexOf(this);

switch (code) {
Expand Down

0 comments on commit c45fdc3

Please # to comment.