mirror of
https://github.com/tonsky/rum.git
synced 2025-08-03 18:13:19 +08:00
Fix render-all to forbid forceUpdate on falsy comp
The `when` condition passes in following situations: - component is unmounted - when it's a falsy value (nil, false) This commit forbids exec of forceRender on falsy components, so such an action will not trigger an error. https://imgur.com/a/SB6ys2E
This commit is contained in:

committed by
Nikita Prokopov

parent
0eac3ee0a1
commit
7ae97891bb
@ -193,7 +193,7 @@
|
||||
|
||||
(defn- render-all [queue]
|
||||
(doseq [comp queue
|
||||
:when (not (gobj/get comp ":rum/unmounted?"))]
|
||||
:when (and (some? comp) (not (gobj/get comp ":rum/unmounted?")))]
|
||||
(.forceUpdate comp)))
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user