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:
parent
083b7c5caa
commit
9d557785e3
|
@ -22,7 +22,7 @@ function linkify(mdString: string) {
|
||||||
let i = 0;
|
let i = 0;
|
||||||
while (i + 1 < parts.length) {
|
while (i + 1 < parts.length) {
|
||||||
result.push(decodeHTMLEntities(parts[i]));
|
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;
|
i += 3;
|
||||||
}
|
}
|
||||||
result.push(decodeHTMLEntities(parts[parts.length - 1]));
|
result.push(decodeHTMLEntities(parts[parts.length - 1]));
|
||||||
|
|
Loading…
Reference in New Issue