Skip to content

Commit

Permalink
fix: setting state on initial load
Browse files Browse the repository at this point in the history
  • Loading branch information
James Klassen authored and James Klassen committed Jul 11, 2023
1 parent af80b84 commit e2d0500
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions components/skeleton/skeleton-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,14 @@ export const SkeletonMixin = dedupeMixin(superclass => class extends RtlMixin(su

_onSubscribe() {
this._skeletonWait = true;
if (this._skeleton !== this._skeletonActive) {
this._skeletonActive = true;
this.requestUpdate('skeleton', this._skeleton);
}
this._skeletonActive = true;
this.requestUpdate('skeleton', this._skeleton);
}

_onUnsubscribe() {
this._skeletonWait = false;
if (this._skeleton !== this._skeletonActive) {
this._skeletonActive = this._skeleton;
this.requestUpdate('skeleton', this._skeleton);
}
this._skeletonActive = this._skeleton;
this.requestUpdate('skeleton', this._skeleton);
}

});

0 comments on commit e2d0500

Please sign in to comment.