mirror of
https://github.com/penpot/penpot.git
synced 2025-03-31 09:01:20 -05:00
🐛 Penpot crashes when a new colorpicker is created while uploading an image to another instance
This commit is contained in:
parent
3e6b34c563
commit
4884a11102
2 changed files with 5 additions and 3 deletions
|
@ -47,6 +47,7 @@
|
|||
- Fix SVG attrs are not handled correctly when exporting/importing in .zip [Taiga #7920](https://tree.taiga.io/project/penpot/issue/7920)
|
||||
- Fix validation error when detaching with two nested copies and a swap [Taiga #8095](https://tree.taiga.io/project/penpot/issue/8095)
|
||||
- Export shapes that are rotated act a bit strange when reimported [Taiga #7585](https://tree.taiga.io/project/penpot/issue/7585)
|
||||
- Penpot crashes when a new colorpicker is created while uploading an image to another instance [Taiga #8119](https://tree.taiga.io/project/penpot/issue/8119)
|
||||
|
||||
## 2.0.3
|
||||
|
||||
|
|
|
@ -590,7 +590,7 @@
|
|||
(update [_ state]
|
||||
(update state :colorpicker
|
||||
(fn [state]
|
||||
(let [type (:type state)
|
||||
(let [type (:type state)
|
||||
state (-> state
|
||||
(update :current-color merge changes)
|
||||
(update :current-color materialize-color-components)
|
||||
|
@ -605,11 +605,12 @@
|
|||
|
||||
(-> state
|
||||
(dissoc :gradient :stops :editing-stop)
|
||||
(cond-> (not= :image (:type state))
|
||||
(cond-> (not= :image type)
|
||||
(assoc :type :color))))))))
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(when add-recent?
|
||||
;; Type can be null, because the colorpicker can be closed while a color image finish its upload
|
||||
(when (and add-recent? (some? (:type state)))
|
||||
(let [formated-color (get-color-from-colorpicker-state (:colorpicker state))]
|
||||
(rx/of (dwl/add-recent-color formated-color)))))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue