modal/button: prevent error when label is updated before the widget is fully created
This commit is contained in:
parent
332f3bbc65
commit
367a0ddbf9
3 changed files with 5 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
- bug fixes
|
||||
- custom module / theme: prevent reloading the module while the file is being written to
|
||||
- modal/button: prevent error when `label` is updated
|
||||
|
||||
- widgets
|
||||
- encoder: add `ticks` property back
|
||||
|
|
|
|||
|
|
@ -202,6 +202,8 @@ class Button extends Widget {
|
|||
|
||||
updateLabel() {
|
||||
|
||||
if (!this.label) return
|
||||
|
||||
if (this.getProp('label') === false) {
|
||||
|
||||
if (this.widget.contains(this.label)) this.widget.removeChild(this.label)
|
||||
|
|
|
|||
|
|
@ -207,6 +207,8 @@ class Modal extends Panel {
|
|||
|
||||
updateLabel() {
|
||||
|
||||
if (!this.label) return
|
||||
|
||||
if (this.getProp('label') === false) {
|
||||
|
||||
if (this.container.contains(this.label)) this.container.removeChild(this.label)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue