Skip to content

Commit

Permalink
Merge pull request #7 from dgwaldo/master
Browse files Browse the repository at this point in the history
Fixes Error: An item with the same key has already been added.
  • Loading branch information
binodnp authored Oct 24, 2018
2 parents 9a4dbd4 + ac26c03 commit 3af0511
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/MixERP.Net.VCards/Parser/TokenParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ private static Dictionary<string, string> GetAdditionalKeyMembers(string data)
{
value = splitted[1].Trim('"').Trim('\'');
}

members.Add(key, value);
if (!members.ContainsKey(key))
{
members.Add(key, value);
}
}

return members;
Expand Down Expand Up @@ -134,4 +136,4 @@ public static IEnumerable<Token> Parse(string contents)
return tokens;
}
}
}
}

0 comments on commit 3af0511

Please sign in to comment.