Skip to content

Commit 4119c66

Browse files
authored
Continue forward if no new direction
1 parent 19827d0 commit 4119c66

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

arena.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,10 @@ function tick(){
550550
let participant = solidWorm.getParticipant();
551551
participant.payload.response = null;
552552
participant.postMessage(arenaClone).then(response => {
553-
participant.payload.response = response.message.data;
554-
updateDirection(participant);
553+
if(response.message){
554+
participant.payload.response = response.message.data;
555+
updateDirection(participant);
556+
}
555557
}).finally(()=>participant.payload.wormUpdated());
556558
_participantPromises.push(new Promise(resolve => participant.payload.wormUpdated = resolve));
557559
});

0 commit comments

Comments
 (0)