We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 181744b + 75cbd00 commit e8fe07bCopy full SHA for e8fe07b
src/commands/Administration/resetserver.ts
@@ -101,7 +101,7 @@ const Resetserver: Command<Message> = {
101
.map(
102
(save) => `${client.config.serverpath}/${server.path}/saves/${save}`
103
);
104
- const latestSavePath = sortModifiedDate(saves)[0].path;
+ const latestSavePath = sortModifiedDate(saves)[0]?.path;
105
// if there are saves, back up latest and remove all after
106
if (latestSavePath) {
107
const latestSave = latestSavePath.slice(
0 commit comments