From 09f250ae3048dab428c488ea6bc489319926868b Mon Sep 17 00:00:00 2001 From: Chris Beer <cabeer@stanford.edu> Date: Fri, 15 Feb 2019 09:51:30 -0800 Subject: [PATCH] Guard against manifestations that aren't IIIF resources --- src/state/selectors/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/state/selectors/index.js b/src/state/selectors/index.js index a09bafd66..557d5d3b4 100644 --- a/src/state/selectors/index.js +++ b/src/state/selectors/index.js @@ -60,6 +60,10 @@ export function getManifestCanvases(manifest) { return []; } + if (!manifest.manifestation.getSequences || !manifest.manifestation.getSequences()[0]) { + return []; + } + return manifest.manifestation.getSequences()[0].getCanvases(); } -- GitLab