From 4e884b10ee2a96f0166f20257f01408a66772fa9 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Mon, 26 Feb 2024 11:35:17 +0100 Subject: [PATCH] fix: check if heightmapColorSchemes is defined --- modules/io/load.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/io/load.js b/modules/io/load.js index 319c1ffb..034d977a 100644 --- a/modules/io/load.js +++ b/modules/io/load.js @@ -460,8 +460,8 @@ async function parseLoadedData(data, mapVersion) { resolveVersionConflicts(versionNumber); } - { - // add custom heightmap color scheme if any + // add custom heightmap color scheme if any + if (heightmapColorSchemes) { const oceanScheme = terrs.select("#oceanHeights").attr("scheme"); const landScheme = terrs.select("#landHeights").attr("scheme"); if (!(oceanScheme in heightmapColorSchemes)) addCustomColorScheme(oceanScheme);