mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-12 01:03:39 +00:00
replace indexOf with includes where possible
This commit is contained in:
+2
-2
@@ -144,7 +144,7 @@ function switchDevice(id) {
|
||||
if (pinnedDevices.length > 0) {
|
||||
cols += pinnedDevices.length;
|
||||
}
|
||||
if (pinnedDevices.indexOf(activeDevice) >= 0 || id === undefined) {
|
||||
if (pinnedDevices.includes(activeDevice) || id === undefined) {
|
||||
cols--;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ module.exports.pinActiveDevice = function pinActiveDevice() {
|
||||
if (activeDevice === undefined) {
|
||||
return;
|
||||
}
|
||||
if (pinnedDevices.indexOf(DEVICE.all[activeDevice.id]) === -1) {
|
||||
if (!pinnedDevices.includes(DEVICE.all[activeDevice.id])) {
|
||||
pinnedDevices.push(DEVICE.all[activeDevice.id]);
|
||||
}
|
||||
DEVICE.changeActivePinIndex(true);
|
||||
|
||||
Reference in New Issue
Block a user