Skip to content

Commit

Permalink
formatting corections for #16 and PR #17
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahhb committed Feb 11, 2024
1 parent 1225358 commit f756829
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions com.f1-tools.mvf1.sdPlugin/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,19 +802,19 @@ const showPlayerTiles = function (device, caller_uuid, payload) {
for (let i = 0; i < num_tiles; i++) {
let driver = sorted_drivers[i + j * num_tiles];
if (driver === undefined) {
if (j === 0) {
// On the first page add empty tiles to prevent issues on the Stream Deck XL (#16: 'MultiAction[device].tiles.pages[j0][`${row}:${col}`].context: undefined')
driver = {
tla: '',
headshot: '',
context: '',
type: 'EMPTY',
id: '',
};
} else {
break;
}
}
// On the first page add empty tiles to prevent undefined tiles from causing problems(#16)
// when the number of drivers is fewer than the number on the first page.
if (j > 0) {
break;
}
driver = {
tla: '',
headshot: '',
context: '',
type: 'EMPTY',
id: '',
};
}
let row = Math.floor(i / aval_cols) % aval_rows;
let col = i % aval_cols;

Expand Down

0 comments on commit f756829

Please sign in to comment.