Merge pull request #2 from n8k99/claude/claude-md-mhy85sj7tlvzwb5w-01QzBpdgGJXE5Qk3JaNupuxM

fix: prevent ReferenceError when loading maps before style.js loads
This commit is contained in:
Nathan Eckenrode 2025-11-13 22:15:32 -05:00 committed by GitHub
commit 0ee6d8ef89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -477,7 +477,7 @@ async function parseLoadedData(data, mapVersion) {
}
// add custom heightmap color scheme if any
if (heightmapColorSchemes) {
if (typeof heightmapColorSchemes !== "undefined" && heightmapColorSchemes) {
const oceanScheme = byId("oceanHeights")?.getAttribute("scheme");
if (oceanScheme && !(oceanScheme in heightmapColorSchemes)) addCustomColorScheme(oceanScheme);
const landScheme = byId("#landHeights")?.getAttribute("scheme");