From fbe81faae2282fd6ae719b6e04e18e940ed33db7 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 11 May 2026 22:00:40 +0200 Subject: [PATCH] Improve validation for target anchor offset --- src/document/scene-document-validation.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/document/scene-document-validation.ts b/src/document/scene-document-validation.ts index 3fadf579..88855fb4 100644 --- a/src/document/scene-document-validation.ts +++ b/src/document/scene-document-validation.ts @@ -5009,7 +5009,11 @@ function validateNpcEntity( ); } - if (!isFiniteVec3(entity.targetAnchor.offset)) { + if ( + typeof entity.targetAnchor.offset !== "object" || + entity.targetAnchor.offset === null || + !isFiniteVec3(entity.targetAnchor.offset) + ) { diagnostics.push( createDiagnostic( "error",