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:
Karol Wójcik
2019-11-04 10:12:58 +01:00
committed by Nikita Prokopov
parent 0eac3ee0a1
commit 7ae97891bb

View File

@ -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)))