One missing conversion of string to array

If your citizen has in its json the material_tags in array format, when you select him, open his character sheet, then selects another person, it will throw this error:

TypeError: material.split is not a function
at n._examineEntity (http://radiant/stonehearth/ui/game/character_sheets/citizen_character_sheet/citizen_character_sheet.js:978:44)

To fix it, just go to that file, and replace

      var material = catalogData.materials;
      var materials = material && material.split(' ');


      var materials = "";
      if ((typeof catalogData.materials) === 'string') {
         materials = catalogData.materials.split(' ');
      } else {
         materials = catalogData.materials;

(Sorry for missing this one in my suggestion to convert the string tags to array)


Fix will be in the next build

1 Like