Skip to content

Commit

Permalink
chore(code style): removed redundant spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
alionazherdetska committed Dec 18, 2024
1 parent b540d1c commit 7aab945
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,23 @@ export class PostCollapsible {
@Method()
async toggle(open = !this.isOpen): Promise<boolean> {
if (open === this.isOpen) return open;

this.isOpen = open;
this.collapsed = !open;
if (this.isLoaded) this.postToggle.emit(open);

const animation = open ? expand(this.host) : collapse(this.host);

if (!this.isLoaded || isMotionReduced()) animation.finish();

await animation.finished;

const isHostRendered = this.host.offsetParent;
if (isHostRendered) animation.commitStyles();
if (open) {
this.host.style.overflow = 'visible';
}

return open;
}

Expand Down

0 comments on commit 7aab945

Please sign in to comment.