From 07cf40008a811577274976283584e4f2cae33acb Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Mon, 7 Nov 2022 12:58:39 +0100 Subject: [PATCH] fixed recently played maps --- mapvote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapvote.js b/mapvote.js index f7ff0ca..dba8b2b 100644 --- a/mapvote.js +++ b/mapvote.js @@ -490,7 +490,7 @@ export default class MapVote extends DiscordBasePlugin { const sanitizedLayers = Layers.layers.filter((l) => l.layerid && l.map); const maxOptions = this.options.showRerollOption ? 5 : 6; if (!cmdLayers || cmdLayers.length == 0) { - const recentlyPlayedMaps = this.objArrToValArr(this.server.layerHistory.splice(0, this.options.numberRecentMapsToExlude), "layer", "map", "name"); + const recentlyPlayedMaps = this.objArrToValArr(this.server.layerHistory.slice(0, this.options.numberRecentMapsToExlude), "layer", "map", "name"); this.verbose(1, "Recently played maps: " + recentlyPlayedMaps.join(', ')) const all_layers = sanitizedLayers.filter((l) =>