Ticket #3637: noInfinity.diff

File noInfinity.diff, 633 bytes (added by sanderd17, 8 years ago)
  • binaries/data/mods/public/simulation/components/ResourceSupply.js

     
    5151        this.gatherers.push([]);
    5252
    5353    this.infinite = !isFinite(+this.template.Amount);
     54    if (this.infinite)
     55        this.amount = null; // TODO hack to not serialize Infinity.
    5456
    5557    [this.type,this.subType] = this.template.Type.split('.');
    5658    this.cachedType = { "generic" : this.type, "specific" : this.subType };