Skip to content
Snippets Groups Projects
Commit fae99a70 authored by Johannes Baiter's avatar Johannes Baiter Committed by Chris Beer
Browse files

Use getCurrentCanvas selector instead of getVisibleCanvasIds


Co-authored-by: default avatarChris Beer <chris@cbeer.info>
parent f00f045c
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment