Skip to content

Commit

Permalink
fix(accordion): ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ariellalgilmore committed Dec 5, 2023
1 parent fdf5b24 commit 8a92649
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ class CDSAccordionItem extends FocusMixin(LitElement) {
)
);
}
const content = this.shadowRoot.querySelector(`.${prefix}--accordion__wrapper`);
const content = this.shadowRoot!.querySelector(`.${prefix}--accordion__wrapper`) as HTMLElement;

if (this.open) {
// accordion opens
content.style.maxBlockSize = content.scrollHeight + 15 + 'px';
content!.style.maxBlockSize = content!.scrollHeight + 15 + 'px';
} else {
// accordion closes
content.style.maxBlockSize = '';
content!.style.maxBlockSize = '';
}
}

Expand Down

0 comments on commit 8a92649

Please sign in to comment.