Skip to content

Commit 8a43e73

Browse files
jcfrancobenelan
authored andcommitted
fix(modal): fix issue caused by early opening logic calls (#11498)
1 parent 512fd84 commit 8a43e73

File tree

1 file changed

+7
-1
lines changed
  • packages/calcite-components/src/components/modal

1 file changed

+7
-1
lines changed

Diff for: packages/calcite-components/src/components/modal/modal.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,14 @@ export class Modal extends LitElement implements OpenCloseComponent, LoadableCom
406406
}
407407

408408
private handleOpenedChange(value: boolean): void {
409+
const { transitionEl } = this;
410+
411+
if (!transitionEl) {
412+
return;
413+
}
414+
409415
const idleClass = value ? CSS.openingIdle : CSS.closingIdle;
410-
this.transitionEl.classList.add(idleClass);
416+
transitionEl.classList.add(idleClass);
411417
onToggleOpenCloseComponent(this);
412418
}
413419

0 commit comments

Comments
 (0)