mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 18:10:47 -04:00
crashing lol
This commit is contained in:
@@ -162,6 +162,7 @@ const commands = createCommandHandlers({
|
|||||||
roverManager,
|
roverManager,
|
||||||
getMode,
|
getMode,
|
||||||
MODES,
|
MODES,
|
||||||
|
getGlobalObjective,
|
||||||
getActiveDrivers,
|
getActiveDrivers,
|
||||||
getNickname,
|
getNickname,
|
||||||
subscribe,
|
subscribe,
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ function createUserAnnouncements(deps) {
|
|||||||
function buildSnapshot() {
|
function buildSnapshot() {
|
||||||
const mode = getMode();
|
const mode = getMode();
|
||||||
const publicMode = isPublicMode(mode);
|
const publicMode = isPublicMode(mode);
|
||||||
const objective = getGlobalObjective();
|
const objective = typeof getGlobalObjective === 'function' ? getGlobalObjective() : null;
|
||||||
const objectiveText = objective?.text ? String(objective.text).trim() : '';
|
const objectiveText = objective?.text ? String(objective.text).trim() : '';
|
||||||
const publicRecords = Array.from(rovers.values()).filter((record) => roverManager.canReplayRoverId(record?.id));
|
const publicRecords = Array.from(rovers.values()).filter((record) => roverManager.canReplayRoverId(record?.id));
|
||||||
const readyRecords = publicMode ? publicRecords.filter((record) => !record.locked) : [];
|
const readyRecords = publicMode ? publicRecords.filter((record) => !record.locked) : [];
|
||||||
|
|||||||
Reference in New Issue
Block a user