0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 08:20:45 -05:00

🐛 Fix wrong pop on setup shortcuts

This commit is contained in:
Pablo Alba 2023-01-25 13:05:03 +01:00
parent c7e9c658cd
commit a09198b46e

View file

@ -342,10 +342,10 @@
(mf/use-effect (mf/use-effect
(mf/deps path-editing? drawing-path?) (mf/deps path-editing? drawing-path?)
(fn [] (fn []
(when (or drawing-path? path-editing?) (cond
(st/emit! (dsc/push-shortcuts ::path psc/shortcuts)) (or drawing-path? path-editing?)
(do (st/emit! (dsc/push-shortcuts ::path psc/shortcuts))
#(st/emit! (dsc/pop-shortcuts ::path))) #(st/emit! (dsc/pop-shortcuts ::path)))
text-editing?
(when text-editing? (do (st/emit! (dsc/push-shortcuts ::text tsc/shortcuts))
(st/emit! (dsc/push-shortcuts ::text tsc/shortcuts)) #(st/emit! (dsc/pop-shortcuts ::text)))))))
#(st/emit! (dsc/pop-shortcuts ::text))))))