From dbb886a9f146d8418aba757364f827f3afec4ff0 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 3 Apr 2026 00:03:00 +0200 Subject: [PATCH] Fix potential null access in model instance selection check --- tests/e2e/import-model-asset.e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/import-model-asset.e2e.ts b/tests/e2e/import-model-asset.e2e.ts index aa1d4afc..41617ff1 100644 --- a/tests/e2e/import-model-asset.e2e.ts +++ b/tests/e2e/import-model-asset.e2e.ts @@ -44,7 +44,7 @@ test("imports a model asset, places an instance, and survives reload", async ({ await viewportCanvas.click({ position: { x: 92, y: 76 } }); await expect(page.getByTestId("outliner-model-instance-list").getByRole("button")).toHaveCount(2); const snapshot = await getEditorStoreSnapshot(page); - const selectedModelInstanceId = snapshot.selection.kind === "modelInstances" ? snapshot.selection.ids[0] ?? null : null; + const selectedModelInstanceId = snapshot.selection.kind === "modelInstances" ? snapshot.selection.ids?.[0] ?? null : null; expect(selectedModelInstanceId).not.toBeNull();