mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-27 16:58:46 +00:00
Fix #417 handle invalid alternative condition
This commit is contained in:
@@ -397,6 +397,7 @@ function testCondition(condition: any, ctx: LootContext): boolean {
|
||||
|
||||
const LootConditions: Record<string, (params: any) => LootCondition> = {
|
||||
alternative: ({ terms }) => (ctx) => {
|
||||
if (!Array.isArray(terms) || terms.length === 0) return true
|
||||
for (const term of terms) {
|
||||
if (testCondition(term, ctx)) {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user