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.
1 parent 181744b commit 75cbd00Copy full SHA for 75cbd00
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