Fixed ESLint error

This commit is contained in:
Justin Kolasa (from Dev Box)
2025-05-19 16:32:47 -04:00
parent b24b3d6b8e
commit 3f3c3f1b83

View File

@@ -313,9 +313,7 @@ export default class Explorer {
// Try to navigate to VS Code protocol // Try to navigate to VS Code protocol
try { try {
// Listen for blur event which might indicate app was launched // Listen for blur event which might indicate app was launched
window.addEventListener( const onBlur = () => {
"blur",
function onBlur() {
clearTimeout(timeoutId); clearTimeout(timeoutId);
window.removeEventListener("blur", onBlur); window.removeEventListener("blur", onBlur);
if (document.body.contains(iframe)) { if (document.body.contains(iframe)) {
@@ -323,9 +321,8 @@ export default class Explorer {
} }
// Window lost focus, likely because VS Code opened // Window lost focus, likely because VS Code opened
resolve(true); resolve(true);
}, };
{ once: true }, window.addEventListener("blur", onBlur, { once: true });
);
// Navigate iframe to the VSCode URL // Navigate iframe to the VSCode URL
iframe.src = vscodeUrl; iframe.src = vscodeUrl;