New built spawn has spawning set to undefined instead of null
-
As per documentation of StructureSpawn http://support.screeps.com/hc/en-us/articles/205990342-StructureSpawn its attribute spawning should be set to null when it's not busy.
But a newly built spawn had it set as undefined until I've made it spawn its first creep:
-
Confirmed Game.spawns.Spawn1.spawning = null in simulator.
But doesn't checking == null or != null sufficient in both cases? This is a weird edge case.
-
Well, that is how i've found the issue:
_.find(this.spawns, {spawning: null});
-
Thanks, fixed.