[client] Only render the pencil if it actually exists
This commit is contained in:
parent
ec5f7e0bd9
commit
4a55f7a941
|
@ -178,7 +178,9 @@ class BoardWindow extends EventEmitter
|
||||||
context.clearRect(0, 0, canvas.width, canvas.height);
|
context.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
|
|
||||||
this.renderOthers(canvas, context);
|
this.renderOthers(canvas, context);
|
||||||
this.pencil.render(canvas, context);
|
// Render the currently active line
|
||||||
|
if(typeof this.pencil !== "undefined")
|
||||||
|
this.pencil.render(canvas, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderOthers(canvas, context)
|
renderOthers(canvas, context)
|
||||||
|
|
Loading…
Reference in New Issue