auto-git:

[change] src/document/migrate-scene-document.ts
This commit is contained in:
2026-04-18 19:59:39 +02:00
parent defaa4adf0
commit 4afef32d5d

View File

@@ -1847,8 +1847,11 @@ function readTerrain(value: unknown, label: string): Terrain {
const cellSize = normalizeTerrainCellSize( const cellSize = normalizeTerrainCellSize(
expectFiniteNumber(value.cellSize, `${label}.cellSize`) expectFiniteNumber(value.cellSize, `${label}.cellSize`)
); );
const heights = expectArray(value.heights, `${label}.heights`).map( if (!Array.isArray(value.heights)) {
(heightValue, index) => throw new Error(`${label}.heights must be an array.`);
}
const heights = value.heights.map((heightValue, index) =>
expectFiniteNumber(heightValue, `${label}.heights.${index}`) expectFiniteNumber(heightValue, `${label}.heights.${index}`)
); );