From 48ceefc2d0aea678e8679d0cef2102aac562f6e4 Mon Sep 17 00:00:00 2001 From: Benjamin Armintor Date: Tue, 27 Aug 2024 12:42:27 -0400 Subject: [PATCH] COLUMBIA: guard against undefined window property in companionWindows selector - see also https://github.com/ProjectMirador/mirador/issues/3930 --- src/state/selectors/companionWindows.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/selectors/companionWindows.js b/src/state/selectors/companionWindows.js index ea91987ef..5d47ed86b 100644 --- a/src/state/selectors/companionWindows.js +++ b/src/state/selectors/companionWindows.js @@ -74,7 +74,7 @@ const getCompanionWindowsByWindowAndPosition = createSelector( (Object.keys(windows) || []).reduce((obj, id) => ({ ...obj, [id]: groupBy( - windows[id].companionWindowIds.map(cwid => companionWindows[cwid]), + (windows[id].companionWindowIds || []).map(cwid => companionWindows[cwid]), cw => cw.position, ), }), {})