diff --git a/src/main/protocol-handler/router.ts b/src/main/protocol-handler/router.ts index 6a8090617b..cbd609a9ff 100644 --- a/src/main/protocol-handler/router.ts +++ b/src/main/protocol-handler/router.ts @@ -82,10 +82,10 @@ export class LensProtocolRouterMain extends proto.LensProtocolRouter { throw new proto.RoutingError(proto.RoutingErrorType.INVALID_PROTOCOL, url); } + WindowManager.getInstance(false)?.ensureMainWindow().catch(noop); const routeInternally = checkHost(url); logger.info(`${proto.LensProtocolRouter.LoggingPrefix}: routing ${url.toString()}`); - WindowManager.getInstance(false)?.ensureMainWindow().catch(noop); if (routeInternally) { this._routeToInternal(url);