mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-05-04 20:11:33 +08:00
[database] fix flow issue
This commit is contained in:
@@ -62,7 +62,9 @@ export default class DataSnapshot {
|
||||
// todo this is wrong - child keys needs to be the ordered keys, from FB
|
||||
// todo potential solution is build up a tree/map of a snapshot and its children
|
||||
// todo natively and send that back to JS to be use in this class.
|
||||
childKeys: isObject(value) ? Object.keys(value) : [],
|
||||
|
||||
// null check to keep flow happy even though isObject already does this
|
||||
childKeys: isObject(value) && value !== null ? Object.keys(value) : [],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user