diff --git a/lib/modules/database/DataSnapshot.js b/lib/modules/database/DataSnapshot.js index 7717e87d..c3500434 100644 --- a/lib/modules/database/DataSnapshot.js +++ b/lib/modules/database/DataSnapshot.js @@ -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) : [], }); }