diff --git a/e2e/usagesPopupLayout.spec.ts b/e2e/usagesPopupLayout.spec.ts index 59d4f3ba20..11cbb6379b 100644 --- a/e2e/usagesPopupLayout.spec.ts +++ b/e2e/usagesPopupLayout.spec.ts @@ -50,7 +50,8 @@ test("Show Usages resizes from its corner, the list fills it, and it reopens at await page.setViewportSize({ width: 1200, height: 800 }); const show = () => page.evaluate(async () => { - const { useUsagesPopup } = await import(/* @vite-ignore */ "/src/features/code-insight/usages.ts"); + const usages = "/src/features/code-insight/usages.ts"; + const { useUsagesPopup } = await import(/* @vite-ignore */ usages); const path = "/dev/app/src/Main.ts"; useUsagesPopup.setState({ open: true, diff --git a/src/features/code-insight/UsagesPopup.tsx b/src/features/code-insight/UsagesPopup.tsx index 738250707b..8b990f236b 100644 --- a/src/features/code-insight/UsagesPopup.tsx +++ b/src/features/code-insight/UsagesPopup.tsx @@ -60,7 +60,7 @@ const MIN_WIDTH = 360; const MIN_HEIGHT = 160; /** The size the popup was last resized to, if any (IDEA remembers Show Usages' size). */ -export function loadUsagesPopupSize(): { w: number; h: number } | null { +function loadUsagesPopupSize(): { w: number; h: number } | null { try { const saved = JSON.parse(localStorage.getItem(SIZE_KEY) ?? "null") as { w?: unknown; h?: unknown } | null; return typeof saved?.w === "number" && typeof saved.h === "number" && Number.isFinite(saved.w + saved.h)