# One missing conversion of string to array

**URL:** <https://discourse.stonehearth.net/t/one-missing-conversion-of-string-to-array/38443>\
**Category:** Resolved Reports\
**Tags:** resolved\
**Created:** [October 26, 2018, 2:58pm UTC](https://discourse.stonehearth.net/t/one-missing-conversion-of-string-to-array/38443 "2018-10-26T14:58:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrunoSupremo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/brunosupremo/32/54819_2.png) [@BrunoSupremo](https://discourse.stonehearth.net/u/BrunoSupremo)\
**Post date:** [October 26, 2018, 2:58pm UTC](https://discourse.stonehearth.net/t/one-missing-conversion-of-string-to-array/38443/1 "2018-10-26T14:58:13Z")

</div>

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:

```auto
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

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

```

with

```auto
      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)

---

<div class="post-metadata">

**Author:** ![linda](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/linda/32/48510_2.png) [@linda](https://discourse.stonehearth.net/u/linda)\
**Post date:** [October 26, 2018, 11:41pm UTC](https://discourse.stonehearth.net/t/one-missing-conversion-of-string-to-array/38443/2 "2018-10-26T23:41:33Z")

</div>

Fix will be in the next build
