From 3f3c3f1b83c8a236da00dc30685abe1e1ca71c9f Mon Sep 17 00:00:00 2001 From: "Justin Kolasa (from Dev Box)" Date: Mon, 19 May 2025 16:32:47 -0400 Subject: [PATCH] Fixed ESLint error --- src/Explorer/Explorer.tsx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index 38ebd2390..b8ed1e0ea 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -313,19 +313,16 @@ export default class Explorer { // Try to navigate to VS Code protocol try { // Listen for blur event which might indicate app was launched - window.addEventListener( - "blur", - function onBlur() { - clearTimeout(timeoutId); - window.removeEventListener("blur", onBlur); - if (document.body.contains(iframe)) { - document.body.removeChild(iframe); - } - // Window lost focus, likely because VS Code opened - resolve(true); - }, - { once: true }, - ); + const onBlur = () => { + clearTimeout(timeoutId); + window.removeEventListener("blur", onBlur); + if (document.body.contains(iframe)) { + document.body.removeChild(iframe); + } + // Window lost focus, likely because VS Code opened + resolve(true); + }; + window.addEventListener("blur", onBlur, { once: true }); // Navigate iframe to the VSCode URL iframe.src = vscodeUrl;