Fix JS error reported by Trackjs.
Fix JS error reported by Trackjs.

adaxi/freeciv-web,andreasrosdal/freeciv-web,andreasrosdal/freeciv-web,adaxi/freeciv-web,adaxi/freeciv-web,adaxi/freeciv-web,andreasrosdal/freeciv-web,andreasrosdal/freeciv-web,andreasrosdal/freeciv-web,adaxi/freeciv-web