Assert flat-list sequential data

Deals with vector-of-maps vs map-of-maps issues, e.g. map-of-maps hangs with
bad errors from React Native side
This commit is contained in:
Oskar Thorén 2017-10-09 10:04:53 +02:00 committed by Roman Volosovskyi
parent 3225d1a258
commit b84e17b974
1 changed files with 1 additions and 0 deletions

View File

@ -86,6 +86,7 @@
"A wrapper for FlatList.
See https://facebook.github.io/react-native/docs/flatlist.html"
[{:keys [data render-fn empty-component] :as props}]
{:pre [(sequential? data)]}
(if (and (empty? data) empty-component)
;; TODO(jeluard) remove when native :ListEmptyComponent is supported
empty-component