From 7a61b9adba04d1477359bd451bca45613e37d339 Mon Sep 17 00:00:00 2001 From: Dominik Rudzki Date: Tue, 10 Dec 2024 19:51:08 +0000 Subject: [PATCH] fix(MetaMaskInstaller): replace delete with assignment to undefined for window.ethereum --- .../src/services/MetaMaskInstaller/startDesktopOnboarding.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/sdk/src/services/MetaMaskInstaller/startDesktopOnboarding.ts b/packages/sdk/src/services/MetaMaskInstaller/startDesktopOnboarding.ts index 270811582..a6b6a9fda 100644 --- a/packages/sdk/src/services/MetaMaskInstaller/startDesktopOnboarding.ts +++ b/packages/sdk/src/services/MetaMaskInstaller/startDesktopOnboarding.ts @@ -18,7 +18,9 @@ export async function startDesktopOnboarding() { ); Ethereum.destroy(); - delete window.ethereum; + if (window.ethereum) { + window.ethereum = undefined; + } const onboardingExtension = new MetaMaskOnboarding(); onboardingExtension.startOnboarding(); }