diff --git a/src/state/selectors/companionWindows.js b/src/state/selectors/companionWindows.js index 914c73a2f..c86d9de83 100644 --- a/src/state/selectors/companionWindows.js +++ b/src/state/selectors/companionWindows.js @@ -98,9 +98,9 @@ const getCompanionWindowIdsOfWindow = createSelector( export const getCompanionWindowsForPosition = createSelector( [ getCompanionWindowsOfWindow, - (state, { position }) => ({ position }), + (state, { position }) => (position), ], - (companionWindows, { position }) => companionWindows[position] || EMPTY_ARRAY, + (companionWindows, position) => companionWindows[position] || EMPTY_ARRAY, ); /** @@ -113,9 +113,9 @@ export const getCompanionWindowsForPosition = createSelector( export const getCompanionWindowsForContent = createSelector( [ getCompanionWindowsOfWindow, - (state, { content }) => ({ content }), + (state, { content }) => (content), ], - (companionWindows, { content }) => ( + (companionWindows, content) => ( [].concat(...Object.values(companionWindows)).filter(w => w.content === content) ), ); @@ -126,9 +126,9 @@ const EMPTY_ARRAY = []; export const getCompanionWindowIdsForPosition = createSelector( [ getCompanionWindowIdsOfWindow, - (state, { position }) => ({ position }), + (state, { position }) => (position), ], - (companionWindowIds, { position }) => companionWindowIds[position] || EMPTY_ARRAY, + (companionWindowIds, position) => companionWindowIds[position] || EMPTY_ARRAY, ); /**