Skip to content

Commit 2730fad

Browse files
authored
Merge pull request #209 from FrankSalad/v3-ServerValue-Timestamp
Add support for firestack.ServerValue.TIMESTAMP
2 parents 9360a5b + 4ab98c1 commit 2730fad

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/firestack.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ export default class Firestack extends Singleton {
6464
if (instance.options.errorOnMissingPlayServices && !this.googleApiAvailability.isAvailable) {
6565
throw new Error(`Google Play Services is required to run this application but no valid installation was found (Code ${this.googleApiAvailability.status}).`);
6666
}
67+
68+
const database = {
69+
ServerValue: {
70+
TIMESTAMP: FirestackModule.serverValueTimestamp || { '.sv': 'timestamp' },
71+
}
72+
};
73+
database.__proto__ = instance.database.__proto__;
74+
instance.database.__proto__ = database;
6775
}
6876

6977
_db: ?Object;

0 commit comments

Comments
 (0)