widget: cast visibility attribute as boolean to avoid comparison mistakes

This commit is contained in:
bordun 2022-05-04 16:27:59 +02:00
parent 9179419e88
commit 0f458cf841

View file

@ -1255,10 +1255,10 @@ class Widget extends EventEmitter {
setVisibility() {
var visible = this.isVisible()
if (visible !== this.visible) {
this.visible = visible
this.visible = !!visible
this.container.style.display = this.getProp('visible') ? '' : 'none'
for (var c of this.children) {