mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-24 00:13:52 -06:00
Fix Layer Filtering.
The raw JSON from the request doesn't use .layerid, instead it uses rawName as per the Layer.js file.
cf882aa3d2/squad-server/layers/layer.js (L5)
This commit is contained in:
parent
1f72d29753
commit
fda26bd68a
@ -876,7 +876,7 @@ export default class MapVote extends DiscordBasePlugin {
|
|||||||
);
|
);
|
||||||
|
|
||||||
for (const layer of response.data.Maps) {
|
for (const layer of response.data.Maps) {
|
||||||
if (!Layers.layers.find((e) => e.layerid == layer.layerid)) Layers.layers.push(new Layer(layer));
|
if (!Layers.layers.find((e) => e.layerid == layer.rawName)) Layers.layers.push(new Layer(layer));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.verbose(1, 'Layer list updated');
|
this.verbose(1, 'Layer list updated');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user