Fix change to loadDocument

This commit is contained in:
Steve Ruiz 2021-09-08 12:09:03 +01:00
parent 220d8aebda
commit c630e1f8be
2 changed files with 12 additions and 2 deletions

View file

@ -17,4 +17,4 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
test-command: 'yarn test' test-command: 'yarn test --ci --runInBand'

View file

@ -538,7 +538,17 @@ export class TLDrawState extends StateManager<Data> {
this.clearSelectHistory() this.clearSelectHistory()
this.session = undefined this.session = undefined
this.selectedGroupId = undefined this.selectedGroupId = undefined
return this.updateDocument(document, 'loaded_document') return this.replaceState(
{
...defaultState,
document,
appState: {
...defaultState.appState,
currentPageId: Object.keys(document.pages)[0],
},
},
'loaded_document'
)
} }
/** /**