mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 20:51:07 +01:00
Fix broken TemplateEnricher - CONFIG.MeasuredTemplate.types has been deprecated and the error was breaking the code
This commit is contained in:
parent
ba84a75bd0
commit
f5eb746510
1 changed files with 2 additions and 1 deletions
|
|
@ -10,7 +10,8 @@ export default function DhTemplateEnricher(match, _options) {
|
||||||
x => x.id.toLowerCase() === split[1] || x.short === split[1]
|
x => x.id.toLowerCase() === split[1] || x.short === split[1]
|
||||||
)?.id
|
)?.id
|
||||||
: params.range;
|
: params.range;
|
||||||
if (!(type in CONFIG.MeasuredTemplate.types) || !range) return match[0];
|
|
||||||
|
if (!(Object.values(CONFIG.DH.GENERAL.templateTypes).find(x => x === type)) || !range) return match[0];
|
||||||
|
|
||||||
const label = game.i18n.localize(`DAGGERHEART.CONFIG.TemplateTypes.${type}`);
|
const label = game.i18n.localize(`DAGGERHEART.CONFIG.TemplateTypes.${type}`);
|
||||||
const rangeDisplay = Number.isNaN(Number(range)) ? game.i18n.localize(`DAGGERHEART.CONFIG.Range.${range}.name`) : range;
|
const rangeDisplay = Number.isNaN(Number(range)) ? game.i18n.localize(`DAGGERHEART.CONFIG.Range.${range}.name`) : range;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue