Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5c3f75a

Browse files
Snapshot child refs shouldn't lose information.
1 parent a61724b commit 5c3f75a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎lib/modules/database/snapshot.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ export default class Snapshot {
4242

4343
child(path: string) {
4444
const value = deepGet(this.value, path);
45+
const exportValue = deepGet(this.exportValue, path);
4546
const childRef = this.ref.child(path);
4647
return new Snapshot(childRef, {
4748
value,
49+
exportValue,
4850
key: childRef.key,
4951
exists: value !== null,
52+
priority: (exportValue && Object.prototype.hasOwnProperty.call(exportValue, '.priority')) ? exportValue['.priority'] : undefined,
5053
childKeys: isObject(value) ? Object.keys(value) : [],
5154
});
5255
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /