message: checking for metadata to be present before tring to clone.
diff: @@ -7,10 +7,6 @@ export class ArtifactItem {
  lastModified: Date;
  metadata: { [key: string]: string }
  - constructor() {
  - this.metadata = {};
  - }
  -
  public static clone(item: ArtifactItem): ArtifactItem {
  var clonedItem = new ArtifactItem();
  clonedItem.itemType = item.itemType;
  @@ -19,9 +15,11 @@ export class ArtifactItem {
  clonedItem.lastModified = item.lastModified;
  clonedItem.metadata = {}
  + if (!!item.metadata) {
  for (var key of Object.keys(item.metadata)) {
  clonedItem.metadata[key] = item.metadata[key];
  }
  + }
  return clonedItem;
  }
  