diff --git a/factory.js b/factory.js index ac984bc..94959bc 100644 --- a/factory.js +++ b/factory.js @@ -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 } }