Skip to content

Commit

Permalink
fix edge-case bug with prebuilt config option
Browse files Browse the repository at this point in the history
  • Loading branch information
pryley committed Apr 30, 2024
1 parent c112bf8 commit bdf0279
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ export class Widget {
}

buildWidget () { // ():void
let parentEl, widgetEl
let parentEl = null;
let widgetEl = null;
if (this.props.prebuilt) {
parentEl = this.el.parentNode
widgetEl = parentEl.querySelector('.' + this.props.classNames.base + '--stars')
} else {
}
if (null === widgetEl) {
parentEl = insertSpanEl(this.el, false, { class: this.props.classNames.base });
parentEl.appendChild(this.el);
widgetEl = insertSpanEl(this.el, true, { class: this.props.classNames.base + '--stars' });
Expand Down

0 comments on commit bdf0279

Please sign in to comment.