diff --git a/src/wm.ts b/src/wm.ts index 4119596..a3f9168 100644 --- a/src/wm.ts +++ b/src/wm.ts @@ -88,14 +88,14 @@ export class FlowWindow { this.focus() } - if (config.canResize === undefined) config.canResize = true + if (config.canResize === undefined || config.canResize === null) config.canResize = true this.element.style.width = `${config.width ?? 300}px` this.element.style.height = `${config.height ?? 200}px` this.header = document.createElement('window-header') this.header.innerHTML = `
${config.title}
` - if (!config.canResize) { + if (config.canResize) { this.header.innerHTML = `
${config.title}
` } @@ -105,7 +105,7 @@ export class FlowWindow { (this.header.querySelector('#min') as HTMLElement).onclick = () => this.toggleMin() - if (!config.canResize) { + if (config.canResize) { (this.header.querySelector('#max') as HTMLElement).onclick = () => this.toggleMax() }