From ba1a6ab3068af8d5f8d3c5e81380957493ebf86b Mon Sep 17 00:00:00 2001 From: KatieFrogs <23621460+KatieFrogs@users.noreply.github.com> Date: Sat, 16 Jul 2022 07:59:09 +0200 Subject: [PATCH] Fix songs with branches --- public/src/js/game.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/src/js/game.js b/public/src/js/game.js index ba2c3f3..dc64545 100644 --- a/public/src/js/game.js +++ b/public/src/js/game.js @@ -202,10 +202,12 @@ class Game{ p2.send("branch", "normal") } } - if(!measure.branch){ - this.controller.lyrics.branch = null - }else if(measure.branch.active){ - this.controller.lyrics.branch = measure.branch.name + if(this.controller.lyrics){ + if(!measure.branch){ + this.controller.lyrics.branch = null + }else if(measure.branch.active){ + this.controller.lyrics.branch = measure.branch.name + } } } }