linkify in markup.js now adds keys to multiple links.

Notably, LID "VIEWWALLET_Subtitle" was causing an issue here, since it
had more than one link. React was complaining about it but now it's all
good.
This commit is contained in:
Daniel Kaspo 2017-05-31 19:58:03 -04:00
parent 083b7c5caa
commit 9d557785e3
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ function linkify(mdString: string) {
let i = 0;
while (i + 1 < parts.length) {
result.push(decodeHTMLEntities(parts[i]));
result.push(<a href={parts[i + 2]} target="_blank">{parts[i + 1]}</a>);
result.push(<a key={'linkify-' + i} href={parts[i + 2]} target="_blank">{parts[i + 1]}</a>);
i += 3;
}
result.push(decodeHTMLEntities(parts[parts.length - 1]));