Skip to content

Commit

Permalink
fix: server filters might not be sent
Browse files Browse the repository at this point in the history
Fixes #1083.
  • Loading branch information
Mygod committed Dec 27, 2024
1 parent 099a22d commit 8a4db0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hooks/useMapData.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ export function useMapData(once = false) {
},
)
const defaultEnabled = prev.filters?.pokemon?.filter?.global?.enabled
const serverEnabled = filters.pokemon?.filter?.global?.enabled
if (
defaultEnabled !== undefined &&
defaultEnabled !== filters.pokemon.filter.global.enabled
serverEnabled !== undefined &&
defaultEnabled !== serverEnabled
)
Object.entries(newFilters.pokemon.filter).forEach(([key, filter]) => {
if (prev.filters.pokemon.filter[key] === undefined)
Expand Down

0 comments on commit 8a4db0f

Please sign in to comment.