mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-03-11 10:39:17 +03:00
check if oldbg is not null
This commit is contained in:
parent
364eddbb2d
commit
2bef5e2245
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ export class Genshinlib
|
|||
else
|
||||
{
|
||||
this.downloadFile(resdone.data.adv.background, path.join(this.launcherDir, this.getConfig().background.name), (current: number, total: number, difference: number) => null).then(() => {
|
||||
fs.unlinkSync(path.join(this.launcherDir, oldbg));
|
||||
oldbg ? fs.unlinkSync(path.join(this.launcherDir, oldbg)) : '';
|
||||
bg = path.join(this.launcherDir, this.getConfig().background.name);
|
||||
})
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue