Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit ced8ad6

Browse files
Fix a deprecation warning
1 parent e68f2eb commit ced8ad6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/firebase.ios.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,16 @@ firebase.init = arg => {
371371
}
372372

373373
if (typeof (FIRFirestore) !== "undefined") {
374+
// fix a deprecation warning
375+
const fIRFirestoreSettings = FIRFirestoreSettings.new();
376+
fIRFirestoreSettings.timestampsInSnapshotsEnabled = true;
377+
374378
// Firestore has offline persistence enabled by default
375379
if (arg.persist === false) {
376-
const fIRFirestoreSettings = FIRFirestoreSettings.new();
377380
fIRFirestoreSettings.persistenceEnabled = false;
378-
fIRFirestoreSettings.timestampsInSnapshotsEnabled = true;
379-
FIRFirestore.firestore().settings = fIRFirestoreSettings;
380381
}
382+
383+
FIRFirestore.firestore().settings = fIRFirestoreSettings;
381384
}
382385

383386
if (typeof (FIRAuth) !== "undefined") {

0 commit comments

Comments
 (0)