1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-26 01:35:28 +03:00

Change lexical scope remaing root

This commit is contained in:
Mark Haslinghuis 2020-12-08 20:13:20 +01:00
parent 317f937fd5
commit 57539eb6de
10 changed files with 55 additions and 59 deletions

View file

@ -2,8 +2,8 @@
// return true if user has choose a special peripheral
function isPeripheralSelected(peripheralName) {
for (var portIndex = 0; portIndex < FC.SERIAL_CONFIG.ports.length; portIndex++) {
var serialPort = FC.SERIAL_CONFIG.ports[portIndex];
for (let portIndex = 0; portIndex < FC.SERIAL_CONFIG.ports.length; portIndex++) {
const serialPort = FC.SERIAL_CONFIG.ports[portIndex];
if (serialPort.functions.indexOf(peripheralName) >= 0) {
return true;
}
@ -25,8 +25,8 @@ function adjustBoxNameIfPeripheralWithModeID(modeId, defaultName) {
default:
return defaultName;
}
}
}
return defaultName;
}
}