mirror of https://github.com/status-im/reagent.git
Catch not= throwing exceptions and log a warning
This commit is contained in:
parent
797951b0bd
commit
8fcac33ce6
|
@ -167,7 +167,10 @@
|
||||||
new-argv ($ nextprops :argv)
|
new-argv ($ nextprops :argv)
|
||||||
noargv (or (nil? old-argv) (nil? new-argv))]
|
noargv (or (nil? old-argv) (nil? new-argv))]
|
||||||
(cond
|
(cond
|
||||||
(nil? f) (or noargv (not= old-argv new-argv))
|
(nil? f) (or noargv (try (not= old-argv new-argv)
|
||||||
|
(catch :default e
|
||||||
|
(warn "Exception thrown while comparing argv's in shouldComponentUpdate. You probably need to set different keys." old-argv new-argv e)
|
||||||
|
false)))
|
||||||
noargv (.call f c c (get-argv c) (props-argv c nextprops))
|
noargv (.call f c c (get-argv c) (props-argv c nextprops))
|
||||||
:else (.call f c c old-argv new-argv))))))
|
:else (.call f c c old-argv new-argv))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue