fix: include assets when importing document (package tldraw) (#950)
* fix: include asset when importing document * defensive tweak * fixey back Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
parent
e1689d678e
commit
ef613af788
1 changed files with 7 additions and 1 deletions
|
@ -1306,7 +1306,13 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
|||
updateDocument = (document: TDDocument, reason = 'updated_document'): this => {
|
||||
const prevState = this.state
|
||||
|
||||
const nextState = { ...prevState, document: { ...prevState.document } }
|
||||
const nextState = {
|
||||
...prevState,
|
||||
document: {
|
||||
...prevState.document,
|
||||
assets: document.assets,
|
||||
},
|
||||
}
|
||||
|
||||
if (!document.pages[this.currentPageId]) {
|
||||
nextState.appState = {
|
||||
|
|
Loading…
Reference in a new issue