Skip to content

Commit

Permalink
fix: backend fallbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Dec 11, 2023
1 parent a876d94 commit 388c14e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/models/Pokemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class Pokemon extends Model {
!getAreaSql(
query,
perms.areaRestrictions,
args.filters.onlyAreas,
args.filters.onlyAreas || [],
isMad,
'pokemon',
)
Expand Down
2 changes: 1 addition & 1 deletion server/src/models/Weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Weather extends Model {
const results = await query

const areas = config.getSafe('areas')
const cleanUserAreas = args.filters.onlyAreas.filter((area) =>
const cleanUserAreas = (args.filters.onlyAreas || []).filter((area) =>
areas.names.has(area),
)
const merged = perms.areaRestrictions.length
Expand Down

0 comments on commit 388c14e

Please sign in to comment.