mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-05-12 08:53:16 +08:00
[database] serverTimeOffset
This commit is contained in:
@@ -250,10 +250,10 @@ export default class Reference extends ReferenceBase {
|
||||
*/
|
||||
push(value: any, onComplete?: Function): Reference | Promise {
|
||||
if (value === null || value === undefined) {
|
||||
return new Reference(this._database, `${this.path}/${generatePushID(this._database.serverTimeOffset)}`);
|
||||
return new Reference(this._database, `${this.path}/${generatePushID(this._database._serverTimeOffset)}`);
|
||||
}
|
||||
|
||||
const newRef = new Reference(this._database, `${this.path}/${generatePushID(this._database.serverTimeOffset)}`);
|
||||
const newRef = new Reference(this._database, `${this.path}/${generatePushID(this._database._serverTimeOffset)}`);
|
||||
const promise = newRef.set(value);
|
||||
|
||||
// if callback provided then internally call the set promise with value
|
||||
|
||||
Reference in New Issue
Block a user