misc snapshot
This commit is contained in:
parent
199b7ee588
commit
da8a2ec645
|
@ -41,6 +41,9 @@ export default class Snapshot {
|
|||
value,
|
||||
key: childRef.key,
|
||||
exists: value !== null,
|
||||
// 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) : [],
|
||||
});
|
||||
}
|
||||
|
@ -50,7 +53,7 @@ export default class Snapshot {
|
|||
}
|
||||
|
||||
forEach(fn: (key: any) => any) {
|
||||
return this.childKeys.forEach((key, i) => fn(this.child(key), i));
|
||||
return this.childKeys.forEach(key => fn(this.child(key)));
|
||||
}
|
||||
|
||||
getPriority() {
|
||||
|
|
Loading…
Reference in New Issue