fix: prevent deleting shape in session (#853)

pull/860/head
Judicael 2022-07-28 10:26:27 +03:00 zatwierdzone przez GitHub
rodzic 3d4544548b
commit 2c53fb3d57
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -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 (