Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"const" incorrectly used for some loop iterators in drivers/bbdmx.js #166

Open
H-s-O opened this issue Jul 25, 2024 · 0 comments
Open

"const" incorrectly used for some loop iterators in drivers/bbdmx.js #166

H-s-O opened this issue Jul 25, 2024 · 0 comments

Comments

@H-s-O
Copy link

H-s-O commented Jul 25, 2024

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/dmx/drivers/bbdmx.js b/node_modules/dmx/drivers/bbdmx.js
index e4df5b5..64c296c 100644
--- a/node_modules/dmx/drivers/bbdmx.js
+++ b/node_modules/dmx/drivers/bbdmx.js
@@ -22,7 +22,7 @@ BBDMX.prototype.sendUniverse = function () {
     let channel;
     let messageBuffer = Buffer.from(UNIVERSE_LEN.toString());
 
-    for (const i = 1; i <= UNIVERSE_LEN; i++) {
+    for (let i = 1; i <= UNIVERSE_LEN; i++) {
       channel = Buffer.from(' ' + this.universe[i]);
       messageBuffer = Buffer.concat([messageBuffer, channel]);
     }
@@ -55,7 +55,7 @@ BBDMX.prototype.update = function (u, extraData) {
 };
 
 BBDMX.prototype.updateAll = function (v) {
-  for (const i = 1; i <= UNIVERSE_LEN; i++) {
+  for (let i = 1; i <= UNIVERSE_LEN; i++) {
     this.universe[i] = v;
   }
 };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant