Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Fix missing 'let' in for loops
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepsteak committed Jul 17, 2022
1 parent 63f5ca3 commit bb40639
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SignallingWebServer/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function scanGamepads() {
function updateStatus() {
scanGamepads();
// Iterate over multiple controllers in the case the mutiple gamepads are connected
for (j in controllers) {
for (let j in controllers) {
let controller = controllers[j];
let currentState = controller.currentState;
let prevState = controller.prevState;
Expand Down Expand Up @@ -464,7 +464,7 @@ var streamTrackSource = null;

function updateStreamList() {
const streamSelector = document.getElementById('stream-select');
for (i = streamSelector.options.length - 1; i >= 0; i--) {
for (let i = streamSelector.options.length - 1; i >= 0; i--) {
streamSelector.remove(i);
}
streamSelector.value = null;
Expand All @@ -485,7 +485,7 @@ function updateTrackList() {
const streamSelector = document.getElementById('stream-select');
const trackSelector = document.getElementById('track-select');
const stream = webRtcPlayerObj.availableVideoStreams.get(streamSelector.value);
for (i = trackSelector.options.length - 1; i >= 0; i--) {
for (let i = trackSelector.options.length - 1; i >= 0; i--) {
trackSelector.remove(i);
}
trackSelector.value = null;
Expand Down Expand Up @@ -1551,7 +1551,7 @@ function emitDescriptor(messageType, descriptor) {
byteIdx++;
data.setUint16(byteIdx, descriptorAsString.length, true);
byteIdx += 2;
for (i = 0; i < descriptorAsString.length; i++) {
for (let i = 0; i < descriptorAsString.length; i++) {
data.setUint16(byteIdx, descriptorAsString.charCodeAt(i), true);
byteIdx += 2;
}
Expand Down

0 comments on commit bb40639

Please sign in to comment.