There was an error while loading. Please reload this page.
1 parent 54f82ea commit 2c80110Copy full SHA for 2c80110
common/src/module/canvas.mjs
@@ -212,8 +212,9 @@ class CanvasAPI extends Module {
212
*/
213
redraw() {
214
if(!this.initialized) throw new Error("Attempting redraw before initialize!")
215
+ if(this.#ctx == null)
216
+ this.#ctx = this.#canvas.getContext("2d")
217
this.#redrawCount = (this.#redrawCount + 1) % 10000
- this.#ctx = this.#canvas.getContext("2d")
218
this._computeAxes()
219
this._reset()
220
this._drawGrid()
0 commit comments