From 4044f640355b7b7a8bdc59fdd05fcdfb89bddcfc Mon Sep 17 00:00:00 2001 From: Zhao Xin <7176466@qq.com> Date: Thu, 1 Sep 2022 14:05:44 +0800 Subject: [PATCH] update --- public/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 09643e8..f7dacce 100644 --- a/public/index.html +++ b/public/index.html @@ -148,8 +148,8 @@ client.on('leds', (array) => { const leds = document.querySelectorAll('.led') for (let i = 0; i < 64; i++) { - if (array[i] == 1) led.classList.add('on') - else led.classList.remove('on') + if (array[i] == 1) leds[i].classList.add('on') + else leds[i].classList.remove('on') } })