Fix change to loadDocument
This commit is contained in:
parent
220d8aebda
commit
c630e1f8be
2 changed files with 12 additions and 2 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -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'
|
||||||
|
|
|
@ -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'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue