fix: copy and paste without selection occurs error (#1135)
* Add optional chaining * dont allow empty clipboard data --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
parent
a9f1a6ccc7
commit
80b4f5aedd
1 changed files with 6 additions and 0 deletions
|
@ -1802,6 +1802,9 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
||||||
|
|
||||||
const jsonString = JSON.stringify({
|
const jsonString = JSON.stringify({
|
||||||
type: 'tldr/clipboard',
|
type: 'tldr/clipboard',
|
||||||
|
shapes: [],
|
||||||
|
assets: [],
|
||||||
|
bindings: [],
|
||||||
...this.clipboard,
|
...this.clipboard,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -2183,6 +2186,9 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
||||||
|
|
||||||
const tldrawString = JSON.stringify({
|
const tldrawString = JSON.stringify({
|
||||||
type: 'tldr/clipboard',
|
type: 'tldr/clipboard',
|
||||||
|
shapes: [],
|
||||||
|
assets: [],
|
||||||
|
bindings: [],
|
||||||
...this.clipboard,
|
...this.clipboard,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue