fix: define religions array even if religions count is 0, v1.89.01

This commit is contained in:
Azgaar 2023-01-13 01:53:23 +04:00
parent dada419f20
commit 9064ffb388
3 changed files with 8 additions and 4 deletions

View file

@ -397,8 +397,12 @@ window.Religions = (function () {
});
});
if (religionsInput.value == 0 || pack.cultures.length < 2)
return religions.filter(r => r.i).forEach(r => (r.code = abbreviate(r.name)));
if (religionsInput.value == 0 || pack.cultures.length < 2) {
religions.filter(r => r.i).forEach(r => (r.code = abbreviate(r.name)));
cells.religion = religionIds;
pack.religions = religions;
return;
}
const burgs = pack.burgs.filter(b => b.i && !b.removed);
const sorted =