Skip to content

Commit b1f0332

Browse files
committed
Add missing exportVal function to DataSnapshot.
1 parent 9ec08b8 commit b1f0332

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ios/Firestack/FirestackDatabase.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ - (NSDictionary *) snapshotToDict:(FIRDataSnapshot *) snapshot
137137
[dict setValue:snapshot.key forKey:@"key"];
138138
NSDictionary *val = snapshot.value;
139139
[dict setObject:val forKey:@"value"];
140+
NSDictionary *exportVal = snapshot.valueInExportFormat;
141+
[dict setObject:exportVal forKey:@"exportVal"];
140142
// Snapshot ordering
141143
NSMutableArray *childKeys = [NSMutableArray array];
142144
if (snapshot.childrenCount > 0) {

lib/modules/database/snapshot.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default class Snapshot {
2222
this.ref = ref;
2323
this.key = snapshot.key;
2424
this.value = snapshot.value;
25+
this.exportVal = snapshot.exportVal;
2526
this.exists = snapshot.exists || true;
2627
this.priority = snapshot.priority === undefined ? null : snapshot.priority;
2728
this.childKeys = snapshot.childKeys || [];
@@ -35,6 +36,10 @@ export default class Snapshot {
3536
return this.value;
3637
}
3738

39+
exportVal() {
40+
return this.exportVal;
41+
}
42+
3843
child(path: string) {
3944
const value = deepGet(this.value, path);
4045
const childRef = this.ref.child(path);

0 commit comments

Comments
 (0)