fix: only confirm property deletion for class schema properties

Deleting any normal block/page property shouldn't require double
clicking
pull/10438/head
Gabriel Horner 2023-10-09 14:08:53 -04:00
parent ae716143e3
commit e6b605e8e5
1 changed files with 3 additions and 1 deletions

View File

@ -424,7 +424,9 @@
(when-not hide-delete?
[:a.fade-link {:on-click (fn [e]
(util/stop e)
(when (js/confirm "Are you sure you want to delete this property?")
(when (or (not (and class? class-schema?))
;; Only ask for confirmation on class schema properties
(js/confirm "Are you sure you want to delete this property?"))
(let [repo (state/get-current-repo)
f (if (and class? class-schema?)
property-handler/class-remove-property!