mirror of
https://github.com/penpot/penpot.git
synced 2026-03-15 15:05:58 +00:00
🐛 Fix wrong pop on setup shortcuts
This commit is contained in:
@@ -342,10 +342,10 @@
|
||||
(mf/use-effect
|
||||
(mf/deps path-editing? drawing-path?)
|
||||
(fn []
|
||||
(when (or drawing-path? path-editing?)
|
||||
(st/emit! (dsc/push-shortcuts ::path psc/shortcuts))
|
||||
#(st/emit! (dsc/pop-shortcuts ::path)))
|
||||
|
||||
(when text-editing?
|
||||
(st/emit! (dsc/push-shortcuts ::text tsc/shortcuts))
|
||||
#(st/emit! (dsc/pop-shortcuts ::text))))))
|
||||
(cond
|
||||
(or drawing-path? path-editing?)
|
||||
(do (st/emit! (dsc/push-shortcuts ::path psc/shortcuts))
|
||||
#(st/emit! (dsc/pop-shortcuts ::path)))
|
||||
text-editing?
|
||||
(do (st/emit! (dsc/push-shortcuts ::text tsc/shortcuts))
|
||||
#(st/emit! (dsc/pop-shortcuts ::text)))))))
|
||||
|
||||
Reference in New Issue
Block a user