Skip to content

Fix crashes in tests.store.js when Firestore returns empty data#8

Open
rahul810050 wants to merge 2 commits intooaiedu:masterfrom
rahul810050:fix/tests-store-empty-snapshot
Open

Fix crashes in tests.store.js when Firestore returns empty data#8
rahul810050 wants to merge 2 commits intooaiedu:masterfrom
rahul810050:fix/tests-store-empty-snapshot

Conversation

@rahul810050
Copy link

This PR fixes runtime crashes in tests.store.js caused by assumptions
that Firestore queries always return at least one document.

Fixed issue: #7

Changes:

  • Added snapshot.empty guards before accessing snapshot.docs[0]
  • Prevented invalid state updates on empty query results
  • Improved stability for fresh or partially populated databases

No functional behavior changes were introduced.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant