Added check for name in unhandled error

This commit is contained in:
Mitchell McCaffrey 2021-02-09 08:07:40 +11:00
parent bbcc123e4e
commit aad173830c

View File

@ -40,7 +40,7 @@ export function DatabaseProvider({ children }) {
}; };
function handleDatabaseError(event) { function handleDatabaseError(event) {
if (event.reason.name === "QuotaExceededError") { if (event.reason?.name === "QuotaExceededError") {
event.preventDefault(); event.preventDefault();
setDatabaseError({ setDatabaseError({
name: event.reason.name, name: event.reason.name,