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) {
if (event.reason.name === "QuotaExceededError") {
if (event.reason?.name === "QuotaExceededError") {
event.preventDefault();
setDatabaseError({
name: event.reason.name,