From 2b97de7a479f919686dc87a66a126254afc1e799 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Sat, 4 Feb 2023 20:38:27 +0100 Subject: [PATCH] One more type fix --- test/components/views/messages/MBeaconBody-test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/components/views/messages/MBeaconBody-test.tsx b/test/components/views/messages/MBeaconBody-test.tsx index a466f9be9e..1e8af0e561 100644 --- a/test/components/views/messages/MBeaconBody-test.tsx +++ b/test/components/views/messages/MBeaconBody-test.tsx @@ -436,7 +436,7 @@ describe("", () => { beforeEach(() => { // mock map utils to raise MapStyleUrlNotConfigured error jest.spyOn(mapUtilHooks, "useMap").mockImplementation(({ onError }) => { - onError(new Error(LocationShareError.MapStyleUrlNotConfigured)); + onError?.(new Error(LocationShareError.MapStyleUrlNotConfigured)); return mockMap; }); });