mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-21 19:41:23 +01:00
Fix issue #51 - edit countries with no capital
Check if a country has a capital before applying style so it doesn't break.
This commit is contained in:
parent
11099bdd47
commit
852fd12e86
1 changed files with 1 additions and 0 deletions
|
|
@ -4523,6 +4523,7 @@ function fantasyMap() {
|
||||||
// highlight capital cells as it's not allowed to change capital's state that way
|
// highlight capital cells as it's not allowed to change capital's state that way
|
||||||
states.map(function(s) {
|
states.map(function(s) {
|
||||||
if (s.color === "neutral") {return;}
|
if (s.color === "neutral") {return;}
|
||||||
|
if (s.capital === "select" || !(s.capital in manors)) {return;}
|
||||||
const capital = s.capital;
|
const capital = s.capital;
|
||||||
const index = manors[capital].cell;
|
const index = manors[capital].cell;
|
||||||
temp.append("path")
|
temp.append("path")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue