Fix Javascript warnings showing up with the new SpiderMonkey
The new SpiderMonkey (#1886) prints more warnings and errors about potentially buggy code. The idea is to have a close look at all these warnings and fix them in a sensible way instead of just trying to get rid of them somehow. If you know any of the affected files especially well or if you're otherwise interested to help, feel free! :) I'll focus on other TODOs for the upgrade first, but if a contributor without commit access proposes a fix, I'll review it quickly (you don't have to fix all warnings at once).
WARNING: JavaScript warning: simulation/helpers/InitGame.js line 31 reference to undefined property settings.mapType
WARNING: JavaScript warning: simulation/components/TechnologyManager.js line 123 reference to undefined property template.requirements
WARNING: JavaScript warning: simulation/components/ProductionQueue.js line 111 reference to undefined property template.Promotion
WARNING: JavaScript warning: simulation/components/Player.js line 479 reference to undefined property this.diplomacy[id]
WARNING: JavaScript warning: simulation/components/Player.js line 386 reference to undefined property this.diplomacy[idx]
WARNING: JavaScript warning: simulation/components/GuiInterface.js line 931 reference to undefined property this.entsRallyPointsDisplayed
WARNING: JavaScript warning: simulation/components/GuiInterface.js line 928 reference to undefined property this.entsRallyPointsDisplayed
WARNING: JavaScript warning: simulation/components/GuiInterface.js line 664 reference to undefined property template.icon
WARNING: JavaScript warning: simulation/components/GuiInterface.js line 1757 reference to undefined property waterPoints[start]
WARNING: JavaScript warning: simulation/components/Attack.js line 490 reference to undefined property missileDirection.y
WARNING: JavaScript warning: simulation/ai/common-api/map-module.js line 78 reference to undefined property this.map[(x + (y * this.width))]
WARNING: JavaScript warning: simulation/ai/common-api/map-module.js line 40 reference to undefined property this.map[(q[0] + (this.width * q[1]))]
WARNING: JavaScript warning: simulation/ai/common-api/terrain-analysis-pathfinder.js line 207 reference to undefined property this.widthMap[index]
WARNING: JavaScript warning: simulation/ai/aegis/worker.js line 148 reference to undefined property this.ent.unitAIState(...).split(...)[2]
WARNING: JavaScript warning: simulation/ai/aegis/defence.js line 146 reference to undefined property this.armyMergeSize
WARNING: JavaScript warning: simulation/ai/aegis/base-manager.js line 118 reference to undefined property HQ.basesMap.map[((x + xi) + ((y + yi) * width))]
WARNING: JavaScript warning: simulation/ai/petra/baseManager.js line 248 reference to undefined property supply.dropsite
Change History
(23)
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Description: |
modified (diff)
|
Milestone: |
Alpha 16 → Alpha 17
|
Keywords: |
simple removed
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
In 14578: