From 83e117ba801bffa066551e62d2a43311a6d0d3d1 Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Thu, 10 Nov 2022 22:05:21 +0100 Subject: [PATCH] fix stackoverflow --- mapvote.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapvote.js b/mapvote.js index fcc5015..97ca760 100644 --- a/mapvote.js +++ b/mapvote.js @@ -464,7 +464,7 @@ export default class MapVote extends DiscordBasePlugin { } //TODO: right now if version is set to "Any" no caf layers will be selected - populateNominations(steamid = null, cmdLayers = [], bypassRaasFilter = false) //gets nomination strings from layer options + populateNominations(steamid = null, cmdLayers = [], bypassRaasFilter = false, tries = 10) //gets nomination strings from layer options { this.options.gamemodeWhitelist.forEach((e, k, a) => a[ k ] = e.toUpperCase()); // this.nominations.push(builtLayerString); @@ -491,7 +491,7 @@ export default class MapVote extends DiscordBasePlugin { const maxOptions = this.options.showRerollOption ? 5 : 6; if (!cmdLayers || cmdLayers.length == 0) { const recentlyPlayedMaps = this.objArrToValArr(this.server.layerHistory.slice(0, this.options.numberRecentMapsToExlude), "layer", "map", "name"); - this.verbose(1, "Recently played maps: " + recentlyPlayedMaps.join(', ')) + this.verbose(1, "Recently played maps: " + recentlyPlayedMaps.map((l)=>l.map.name).join(', ')) const all_layers = sanitizedLayers.filter((l) => this.options.gamemodeWhitelist.includes(l.gamemode.toUpperCase()) &&