#6651 closed defect (fixed)

Structure Tree shouldn't fail for empty history strings

Reported by: Stan Owned by: Freagarach
Priority: Should Have Milestone: Alpha 27
Component: UI – Miscellaneous Keywords:
Cc: s0602004 Patch:

Description

Currently if a civilization has no history string, like for instance the ponies in ponies ascendant, the structure tree breaks with the following error

ERROR: JavaScript error: gui/reference/structree/StructreePage.js line 51 Script value conversion check failed: v.isString()  v.isNumber()  v.isBoolean() (got type undefined)

History being an optional tag in cmpIdentity (https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/simulation/components/Identity.js#L45) it is not required to be there.

Change History (2)

comment:2 by Freagarach, 16 months ago

Owner: set to Freagarach
Resolution: fixed
Status: newclosed

In 27427:

Fix structure tree/civinfo with empty civ history.

Since the history string is optional, don't fail without it.

Based on a patch by: @Silier
Fixes #6651

Note: See TracTickets for help on using tickets.