Fix errors caused by undefined values.

This commit is contained in:
Tipx-L 2023-08-25 11:13:28 -07:00
parent e2d56283f8
commit 457c69f2df
1 changed files with 2 additions and 2 deletions

View File

@ -37563,7 +37563,7 @@
}
if(info.ai==undefined) info.ai={};
const skill=info.ai,card=lib.card[info.viewAs.name].ai;
Object.keys(card).forEach(value=>{
if(card) Object.keys(card).forEach(value=>{
if(skill[value]==undefined) skill[value]=card[value];
else if(typeof skill[value]=='object') Object.keys(card[value]).forEach(element=>{
if(skill[value][element]==undefined) skill[value][element]=card[value][element];
@ -37572,7 +37572,7 @@
}
if(info.inherit){
const skill=lib.skill[info.inherit];
Object.keys(skill).forEach(value=>{
if(skill) Object.keys(skill).forEach(value=>{
if(info[value]!=undefined) return;
if(value=='audio'&&(typeof info[value]=='number'||typeof info[value]=='boolean')) info[value]=info.inherit;
else info[value]=skill[value];