mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
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:
commit
0ee6d8ef89
1 changed files with 1 additions and 1 deletions
|
|
@ -477,7 +477,7 @@ async function parseLoadedData(data, mapVersion) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add custom heightmap color scheme if any
|
// add custom heightmap color scheme if any
|
||||||
if (heightmapColorSchemes) {
|
if (typeof heightmapColorSchemes !== "undefined" && heightmapColorSchemes) {
|
||||||
const oceanScheme = byId("oceanHeights")?.getAttribute("scheme");
|
const oceanScheme = byId("oceanHeights")?.getAttribute("scheme");
|
||||||
if (oceanScheme && !(oceanScheme in heightmapColorSchemes)) addCustomColorScheme(oceanScheme);
|
if (oceanScheme && !(oceanScheme in heightmapColorSchemes)) addCustomColorScheme(oceanScheme);
|
||||||
const landScheme = byId("#landHeights")?.getAttribute("scheme");
|
const landScheme = byId("#landHeights")?.getAttribute("scheme");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue