fix empty slide on presentation change

This commit is contained in:
Ramón Souza 2023-03-29 09:35:10 -03:00
parent 7e455f163a
commit ab8d9214af

View File

@ -239,8 +239,10 @@ export default function Whiteboard(props) {
// update document if the number of pages has changed
if (currentDoc.id !== whiteboardId && currentDoc?.pages.length !== curPres?.pages.length) {
const currentPageShapes = currentDoc?.pages[curPageId]?.shapes;
currentDoc.id = whiteboardId;
currentDoc.pages = pages;
currentDoc.pages[curPageId].shapes = currentPageShapes;
currentDoc.pageStates = pageStates;
}