From 21d0f9405c1474f3d2e1bc74e6184a8df2db8f09 Mon Sep 17 00:00:00 2001 From: Sidney Alcantara Date: Thu, 9 Sep 2021 18:58:54 +1000 Subject: [PATCH] typescript 4.4 fixes --- src/hooks/useTable/useTableData.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useTable/useTableData.tsx b/src/hooks/useTable/useTableData.tsx index 334f38b3..c3ad89b9 100644 --- a/src/hooks/useTable/useTableData.tsx +++ b/src/hooks/useTable/useTableData.tsx @@ -254,7 +254,7 @@ const useTableData = (initialOverrides: any) => { // delete document try { db.collection(tableState.path).doc(rowId).delete(); - } catch (error) { + } catch (error: any) { console.log(error); if (error.code === "permission-denied") { enqueueSnackbar("You do not have the permissions to delete rows.", { @@ -304,7 +304,7 @@ const useTableData = (initialOverrides: any) => { if (missingRequiredFields.length === 0) { try { await db.collection(path).doc(newId).set(docData, { merge: true }); - } catch (error) { + } catch (error: any) { if (error.code === "permission-denied") { enqueueSnackbar("You do not have the permissions to add new rows.", { variant: "error",