Ignore space key presses if there is no active canvas (fixes #123)

This commit is contained in:
Manuel Vögele
2021-11-21 15:13:45 +01:00
parent 035cfb8969
commit b275e777db
+2 -1
View File
@@ -149,7 +149,8 @@ function onKeyShift(up) {
function onKeySpace(up) {
const ruler = canvas.controls.ruler;
if (!ruler.draggedEntity)
// Ruler can end up being undefined here if no canvas is active
if (!ruler?.draggedEntity)
return false;
if (ruler._state !== Ruler.STATES.INACTIVE)