Improve validation for target anchor offset

This commit is contained in:
2026-05-11 22:00:40 +02:00
parent d00404ece3
commit fbe81faae2

View File

@@ -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( diagnostics.push(
createDiagnostic( createDiagnostic(
"error", "error",