bug fix layerfilterWlist

This commit is contained in:
Skillet 2023-05-22 21:43:32 -04:00
parent c6250bdbbc
commit e29358ab3b

View File

@ -377,7 +377,7 @@ export default class MapVote extends DiscordBasePlugin {
layerfilterWlist(layers){
if(this.options.layerFilteringMode.toLowerCase() === "whitelist"){
const rawwl = layers.filter((l) => this.options.layerLevelWhitelist.find((fl) => this.getLayersFromStringId(fl).map((e => e.layerid).includes(l.layerid))));
const rawwl = layers.filter((l) => this.options.layerLevelWhitelist.find((fl) => this.getLayersFromStringId(fl).map((e) => e.layerid).includes(l.layerid)));
if(this.options.applyBlacklistToWhitelist) return rawwl.filter((l) => !(this.options.layerLevelBlacklist.find((fl) => this.getLayersFromStringId(fl).map((e) => e.layerid).includes(l.layerid))));
else return rawwl;
} else {