Merge pull request #621 from universe-st/PR-Branch-1108
对GameEvent.insertAfter的参数做空值判断
This commit is contained in:
commit
167af13ad1
|
@ -31390,14 +31390,18 @@
|
||||||
const next=new lib.element.GameEvent(`${this.name}Inserted`,false);
|
const next=new lib.element.GameEvent(`${this.name}Inserted`,false);
|
||||||
this.next.push(next);
|
this.next.push(next);
|
||||||
next.setContent(content);
|
next.setContent(content);
|
||||||
|
if(map){
|
||||||
Object.entries(map).forEach(entry=>next.set(entry[0],entry[1]));
|
Object.entries(map).forEach(entry=>next.set(entry[0],entry[1]));
|
||||||
|
}
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
insertAfter(content,map){
|
insertAfter(content,map){
|
||||||
const next=new lib.element.GameEvent(`${this.name}Inserted`,false);
|
const next=new lib.element.GameEvent(`${this.name}Inserted`,false);
|
||||||
this.after.push(next);
|
this.after.push(next);
|
||||||
next.setContent(content);
|
next.setContent(content);
|
||||||
|
if(map){
|
||||||
Object.entries(map).forEach(entry=>next.set(entry[0],entry[1]));
|
Object.entries(map).forEach(entry=>next.set(entry[0],entry[1]));
|
||||||
|
}
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
backup(skill){
|
backup(skill){
|
||||||
|
|
Loading…
Reference in New Issue