Skip to content

fix(firestore): Fix PreferRest caching issue#2040

Merged
lahirumaramba merged 1 commit intomasterfrom
lm-fix-fs
Jan 13, 2023
Merged

fix(firestore): Fix PreferRest caching issue#2040
lahirumaramba merged 1 commit intomasterfrom
lm-fix-fs

Conversation

@lahirumaramba
Copy link
Copy Markdown
Member

@lahirumaramba lahirumaramba commented Jan 13, 2023

  • Fixed a caching issue when a non-empty FirestoreSettings object is passed to initializeFirestore(...)
  • Improved test coverage for initializeFirestore()

Before:

initializeFirestore(app)
getFirestore(app) // works!

---

initializeFirestore(app, {})
getFirestore(app) // works!

---

initializeFirestore(app, { preferRest: true })
getFirestore(app) // throws `firestore/failed-precondition` error!

Related to: #1901

Copy link
Copy Markdown

@MarkDuckworth MarkDuckworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants