From 6477714279bf5c41e4bbd90e8fc3f0e40281d1fd Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Tue, 22 Nov 2022 19:53:19 +0100 Subject: [PATCH] fix: savePersistentData is not a function --- mapvote.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mapvote.js b/mapvote.js index a6f5a16..63aed60 100644 --- a/mapvote.js +++ b/mapvote.js @@ -193,10 +193,7 @@ export default class MapVote extends DiscordBasePlugin { this.broadcast = (msg) => { this.server.rcon.broadcast(msg); }; this.warn = (steamid, msg) => { this.server.rcon.warn(steamid, msg); }; - process.on('uncaughtException', function (err) { - this.savePersistentData(); - throw err; - }); + process.on('uncaughtException', this.savePersistentData); } async mount() {