Skip to content

Commit

Permalink
Handle missing tags and typeKeywords properties
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach committed May 17, 2018
1 parent fa3adce commit c7ba459
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/arcgis-rest-items/src/items.ts
Expand Up @@ -384,8 +384,9 @@ function serializeItem(item: IItem): any {
// create a clone so we're not messing with the original
const clone = JSON.parse(JSON.stringify(item));
// join keywords and tags...
clone.typeKeywords = item.typeKeywords.join(", ");
clone.tags = item.tags.join(", ");
const { typeKeywords=[], tags=[] } = item;
clone.typeKeywords = typeKeywords.join(", ");
clone.tags = tags.join(", ");
// convert .data to .text
if (clone.data) {
clone.text = JSON.stringify(clone.data);
Expand Down

0 comments on commit c7ba459

Please sign in to comment.