mirror of
https://github.com/penpot/penpot.git
synced 2025-01-04 13:50:12 -05:00
🐛 Fix file deletion exception
This commit is contained in:
parent
8d74d82fd0
commit
2b31613853
1 changed files with 4 additions and 5 deletions
|
@ -361,7 +361,7 @@
|
|||
;; --- EVENT: delete-file
|
||||
|
||||
(defn file-deleted
|
||||
[_team-id project-id]
|
||||
[project-id]
|
||||
(ptk/reify ::file-deleted
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
|
@ -378,10 +378,9 @@
|
|||
(d/update-when :recent-files dissoc id)))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [team-id (uuid/uuid (get-in state [:route :path-params :team-id]))]
|
||||
(->> (rp/cmd! :delete-file {:id id})
|
||||
(rx/map #(file-deleted team-id project-id)))))))
|
||||
(watch [_ _ _]
|
||||
(->> (rp/cmd! :delete-file {:id id})
|
||||
(rx/map (partial file-deleted project-id))))))
|
||||
|
||||
;; --- Rename File
|
||||
|
||||
|
|
Loading…
Reference in a new issue