Skip to content

Commit

Permalink
Update select.js
Browse files Browse the repository at this point in the history
Lint
  • Loading branch information
Rincelent authored Mar 31, 2023
1 parent 5b4a4f1 commit 2c013f9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/composite/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ var Select = Widget.$extend({
}

this._value = "";
if (this.__displayValue) this.__displayValue.destroy();
if (this.__displayValue) {
this.__displayValue.destroy();
}
this.__displayValue = new MenuItem({text: this.placeholder, className: "photonui-select-placeholder"});
Helpers.cleanNode(this.__html.select);
this.__html.select.appendChild(this.__displayValue.html);
Expand Down Expand Up @@ -326,8 +328,12 @@ var Select = Widget.$extend({
* @method destroy
*/
destroy: function () {
if (this.__displayValue) this.__displayValue.destroy();
if (this.__popupMenu) this.__popupMenu.destroy();
if (this.__displayValue) {
this.__displayValue.destroy();
}
if (this.__popupMenu) {
this.__popupMenu.destroy();
}
this.$super();
},

Expand Down

0 comments on commit 2c013f9

Please sign in to comment.