diff --git a/src/data/trailRenderer.js b/src/data/trailRenderer.js index 9d40da95e..fe1590038 100644 --- a/src/data/trailRenderer.js +++ b/src/data/trailRenderer.js @@ -61,8 +61,14 @@ function joinDoubleClick(viewer, setId, lineFor) { let shared = doubleClicks.get(viewer); if (!shared) { const lines = new Map(); - // A scene that takes no input has no double-click. - const input = findInput(viewer); + // A scene that takes no input (or a headless one, with no page to take + // it from) has no double-click. + let input = null; + try { + input = findInput(viewer); + } catch { + input = null; + } shared = { lines, follow: input diff --git a/src/scenes/dataPacks/presentation.js b/src/scenes/dataPacks/presentation.js index 17e588493..be60d1ac8 100644 --- a/src/scenes/dataPacks/presentation.js +++ b/src/scenes/dataPacks/presentation.js @@ -78,8 +78,14 @@ export function createPackPresentations( function followPoints(setId, items) { pointSets.set(setId, new Map(items.map((item) => [item.id, item]))); if (stockFollow) return; - // A scene that takes no input has no double-click. - const input = findInput(viewer); + // A scene that takes no input (or a headless one, with no page to take + // it from) has no double-click. + let input = null; + try { + input = findInput(viewer); + } catch { + input = null; + } if (!input) return; stockFollow = followOnDoubleClick({ viewer,