Don't display trainer title if undefined
This commit is contained in:
parent
6cff22a9fc
commit
89854691f0
|
@ -48,7 +48,7 @@ export default class Trainer extends Phaser.GameObjects.Container {
|
|||
|
||||
getName(includeTitle: boolean = false): string {
|
||||
let name = this.config.getName(this.female);
|
||||
return includeTitle ? `${this.config.title} ${name}` : name;
|
||||
return includeTitle && this.config.title ? `${this.config.title} ${name}` : name;
|
||||
}
|
||||
|
||||
getBattleBgm(): string {
|
||||
|
|
Loading…
Reference in New Issue