From a93ae6117a6ecf02d77b9a8b64b61f3c92728a07 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 26 Sep 2023 00:25:19 +0200 Subject: [PATCH] Ignore missing screen for TurtlebatchCommand Fixes CODEOCEAN-FRONTEND-47 --- app/assets/javascripts/editor/turtle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/editor/turtle.js b/app/assets/javascripts/editor/turtle.js index d388f375..4ffff77f 100644 --- a/app/assets/javascripts/editor/turtle.js +++ b/app/assets/javascripts/editor/turtle.js @@ -32,7 +32,7 @@ CodeOceanEditorTurtle = { this.showCanvas(); for (var i = 0; i < msg.batch.length; i++) { var cmd = msg.batch[i]; - this.turtlescreen[cmd[0]].apply(this.turtlescreen, cmd[1]); + this.turtlescreen[cmd[0]]?.apply(this.turtlescreen, cmd[1]); } }, @@ -50,4 +50,4 @@ CodeOceanEditorTurtle = { } } -}; \ No newline at end of file +};