auto-git:

[change] src/rendering/terrain-layer-material.ts
This commit is contained in:
2026-05-18 16:06:35 +02:00
parent 880bbf0d3d
commit 849ce834ea

View File

@@ -62,11 +62,11 @@ export function getFallbackTerrainLayerTexture(): Texture {
export function getTerrainLayerTexture(
material: MaterialDef | null,
textureLookup: (material: MaterialDef) => Texture
textureLookup: (material: MaterialDef) => Texture | null
): Texture {
return material === null
? getFallbackTerrainLayerTexture()
: textureLookup(material);
: (textureLookup(material) ?? getFallbackTerrainLayerTexture());
}
export function getTerrainLayerPreviewColor(material: MaterialDef | null): number {