From fae99a7032c1677c29dcf24e73d6b5dedc2d8dfb Mon Sep 17 00:00:00 2001 From: Johannes Baiter <johannes.baiter@bsb-muenchen.de> Date: Thu, 24 Sep 2020 21:51:55 +0200 Subject: [PATCH] Use getCurrentCanvas selector instead of getVisibleCanvasIds Co-authored-by: Chris Beer <chris@cbeer.info> --- src/containers/ViewerInfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/ViewerInfo.js b/src/containers/ViewerInfo.js index 6aacacb19..7e2714d9b 100644 --- a/src/containers/ViewerInfo.js +++ b/src/containers/ViewerInfo.js @@ -5,7 +5,7 @@ import { withStyles } from '@material-ui/core/styles'; import { withPlugins } from '../extend/withPlugins'; import { ViewerInfo } from '../components/ViewerInfo'; import { - getCanvasLabel, getCanvases, getCanvasIndex, getVisibleCanvasIds + getCanvasLabel, getCanvases, getCanvasIndex, getCurrentCanvas, } from '../state/selectors'; /** @@ -17,7 +17,7 @@ const mapStateToProps = (state, props) => { const { windowId } = props; const canvases = getCanvases(state, { windowId }); const canvasIndex = getCanvasIndex(state, { windowId }); - const canvasId = getVisibleCanvasIds(state, { windowId })[0]; + const canvasId = (getCurrentCanvas(state, { windowId }) || {}).id; return { canvasCount: canvases.length, -- GitLab