Skip to content

Commit

Permalink
Eliminate Set.intersection call.
Browse files Browse the repository at this point in the history
  • Loading branch information
KirkMcDonald committed Oct 16, 2024
1 parent 34814e9 commit db061e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ class BuildingSet {
}
}
overlap(other) {
return this.categories.intersection(other.categories).size > 0
for (let category of this.categories) {
if (other.categories.has(category)) {
return true
}
}
return false
}
}

Expand Down

0 comments on commit db061e0

Please sign in to comment.