fix CanvasRenderer#getWindowSize being able to return {undefined, undefined} thus causing errors in math down the line

This commit is contained in:
りき萌 2025-09-10 17:46:24 +02:00
parent 6e666c0265
commit 236d612c20

View file

@ -54,6 +54,7 @@ class CanvasRenderer extends HTMLElement {
} }
getWindowSize() { getWindowSize() {
if (this.width == null || this.height == null) return { width: 0, height: 0 };
return { return {
width: this.width, width: this.width,
height: this.height, height: this.height,