Catch not= throwing exceptions and log a warning

This commit is contained in:
Daniel Compton 2018-02-21 17:19:37 +13:00
parent 797951b0bd
commit 8fcac33ce6
1 changed files with 4 additions and 1 deletions

View File

@ -167,7 +167,10 @@
new-argv ($ nextprops :argv)
noargv (or (nil? old-argv) (nil? new-argv))]
(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))
:else (.call f c c old-argv new-argv))))))