diff --git a/src/views/Game/GameLog.tsx b/src/views/Game/GameLog.tsx index 6c241c92a7..8eb01c481e 100644 --- a/src/views/Game/GameLog.tsx +++ b/src/views/Game/GameLog.tsx @@ -44,8 +44,10 @@ export function GameLog({ const [shouldDisplayFullLog, setShouldDisplayFullLog] = React.useState(false); const { registerTargetItem } = React.useContext(DynamicHelp.Api); - const { ref: autoscoreRef } = registerTargetItem("autoscore-game-log-entry"); + // Defend against the case where we aren't wrapped in a help provider: in a Modal + // TBD: made Modals be able to use the help provider + const autoscoreRef = registerTargetItem?.("autoscore-game-log-entry")?.ref || null; const game_id = goban_config.game_id as number; let firstAutoscoringEntryRendered = false;