File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ export class CodeSnippetDisplay extends React.Component<
328328 while ( nextIndex !== null ) {
329329 // make the current index bold
330330 elements . push (
331- < mark className = { SEARCH_BOLD } >
331+ < mark key = { id + '_' + currIndex } className = { SEARCH_BOLD } >
332332 { displayName . substring ( currIndex , currIndex + 1 ) }
333333 </ mark >
334334 ) ;
@@ -342,10 +342,9 @@ export class CodeSnippetDisplay extends React.Component<
342342 nextIndex = null ;
343343 }
344344 }
345- // key={id+'_'+currIndex}
346345 if ( nextIndex === null ) {
347346 elements . push (
348- < mark className = { SEARCH_BOLD } >
347+ < mark key = { id + '_' + currIndex } className = { SEARCH_BOLD } >
349348 { displayName . substring ( currIndex , currIndex + 1 ) }
350349 </ mark >
351350 ) ;
@@ -1492,8 +1491,8 @@ export class CodeSnippetDisplay extends React.Component<
14921491 />
14931492 < div className = { CODE_SNIPPETS_CONTAINER } >
14941493 < div >
1495- { this . state . codeSnippets . map ( codeSnippet =>
1496- this . renderCodeSnippet ( codeSnippet , codeSnippet . id )
1494+ { this . state . codeSnippets . map ( ( codeSnippet , id ) =>
1495+ this . renderCodeSnippet ( codeSnippet , id )
14971496 ) }
14981497 </ div >
14991498 </ div >
You can’t perform that action at this time.
0 commit comments