Skip to content

Commit

Permalink
fix: hacky speed fix for hidden render
Browse files Browse the repository at this point in the history
  • Loading branch information
justinribeiro committed Oct 12, 2023
1 parent fb1f6f4 commit 9e056ea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/src/blog-pwa.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,14 @@ class BlogPwa extends LitElement {
this.showSnackbar(event.detail);
}

__listenForSlotCleanEvent() {
this.shadowRoot.querySelector('#prerender').classList.add('slide-hide');
/**
* Soooo hacky Justin, but the perf ain't bad
*/
async __listenForSlotCleanEvent() {
const ele = this.shadowRoot.querySelector('#prerender');
ele.classList.add('slide-hide');
await this.updateComplete;
ele.remove();
}

/**
Expand Down

0 comments on commit 9e056ea

Please sign in to comment.