fix: prevent deleting shape in session (#853)

This commit is contained in:
Judicael 2022-07-28 10:26:27 +03:00 committed by GitHub
parent 3d4544548b
commit 2c53fb3d57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3029,6 +3029,8 @@ export class TldrawApp extends StateManager<TDSnapshot> {
*/
delete = (ids = this.selectedIds): this => {
if (ids.length === 0) return this
if (this.session) return this
const drawCommand = Commands.deleteShapes(this, ids)
if (