Skip to content

fix: add missing firebase firestore import to prevent crash#92

Open
kunalpatil-18 wants to merge 1 commit intoruxailab:mainfrom
kunalpatil-18:fix/firebase-import-crash
Open

fix: add missing firebase firestore import to prevent crash#92
kunalpatil-18 wants to merge 1 commit intoruxailab:mainfrom
kunalpatil-18:fix/firebase-import-crash

Conversation

@kunalpatil-18
Copy link

Bug Fix

What is the bug?
The application crashes immediately after clicking "Get Started" (loading the dashboard) with the error:
"TypeError: firebase.firestore is not a function".

Why does it happen?
The CalibTable component attempts to fetch previous calibrations on creation (created hook). However, src/store/calibration.js imports only firebase/app without importing the Firestore module. This causes the store.getAllCalibs function to fail when accessing firebase.firestore().

The Solution
Added import 'firebase/firestore'; to src/store/calibration.js.

How to Test

  1. Run the app locally.
  2. Click "Get Started" to enter the dashboard.
  3. Observe that the "not a function" crash is gone and the page loads (requests will now correctly attempt to reach Firestore).

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