Fix #696 loot table preview error
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled

This commit is contained in:
Misode
2025-02-12 21:01:13 +01:00
parent deca0f1fe2
commit d80a6827e3
2 changed files with 4 additions and 4 deletions

View File

@@ -671,8 +671,8 @@ function prepareIntRange(range: any, ctx: LootContext) {
if (typeof range === 'number') {
range = { min: range, max: range }
}
const min = computeInt(range.min, ctx)
const max = computeInt(range.max, ctx)
const min = computeInt(range?.min, ctx)
const max = computeInt(range?.max, ctx)
return { min, max }
}

View File

@@ -556,8 +556,8 @@ function prepareIntRange(range: any, ctx: LootContext) {
if (typeof range === 'number') {
range = { min: range, max: range }
}
const min = computeInt(range.min, ctx)
const max = computeInt(range.max, ctx)
const min = computeInt(range?.min, ctx)
const max = computeInt(range?.max, ctx)
return { min, max }
}