From 63ab9afc9cf0f58e5e57b42e6233a89d1ea41783 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 3 Apr 2026 00:03:02 +0200 Subject: [PATCH] Fix potential null access in external model instance selection check --- tests/e2e/import-external-model-asset.e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/import-external-model-asset.e2e.ts b/tests/e2e/import-external-model-asset.e2e.ts index 15d2c671..9614a7ce 100644 --- a/tests/e2e/import-external-model-asset.e2e.ts +++ b/tests/e2e/import-external-model-asset.e2e.ts @@ -42,7 +42,7 @@ test("imports a gltf asset with external resources and places an instance", asyn await viewportCanvas.click({ position: { x: 88, y: 84 } }); 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();