Urtrope-Designs / SelecQuest

MIT License
2 stars 0 forks source link

Handle Firestore offline data errors #65

Closed scunningham777 closed 5 years ago

scunningham777 commented 5 years ago

Before attempting to access firestore data, need to check if the db is available. If not, show an error.

Presumably this could occur if the user saves the app to their desktop while online, then goes offline before they launch the desktop version the first time, or if the call to firestore().enablePersistence() fails (can't persist on multiple devices/tabs at once, browser doesn't support it...)

scunningham777 commented 5 years ago

Firestore init code within try-catch block, enablePersistence() logs error response.