From dbf798808456aca353f3ba5f7dd318a42fc09def Mon Sep 17 00:00:00 2001 From: Silver Kuusik Date: Tue, 31 Oct 2017 17:43:43 +0100 Subject: [PATCH] fix block highlight on code stop --- sumorobot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sumorobot.js b/sumorobot.js index 36d7933..cd34224 100755 --- a/sumorobot.js +++ b/sumorobot.js @@ -429,8 +429,8 @@ window.onload = function() { block_highlight = new WebSocket("ws://" + robotServer + ":80/p2p/browser/" + robotID + "-highlight/"); /* when there is a message from the WebSocket */ block_highlight.onmessage = function(evt) { - /* when scope is received */ - if (evt.data.length == 20) { + /* when block id received and sumorobot is started */ + if (evt.data.length == 20 && sumostart) { workspace.highlightBlock(evt.data); highlighted = evt.data; }