mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1853030 - [devtools] Set more specific key for FontName. r=jdescottes,devtools-reviewers.
For a given family, we can get multiple time the same font returned by the server. In such case, we had duplicated keys, which seemed to cause trouble in the React render cycle, ultimately causing to render more font than what was sent from the server. Differential Revision: https://phabricator.services.mozilla.com/D223144
This commit is contained in:
parent
0d46faca9e
commit
21776e8caa
@ -152,9 +152,9 @@ class FontEditor extends PureComponent {
|
||||
}
|
||||
|
||||
renderFontGroup(family, fonts = []) {
|
||||
const group = fonts.map(font => {
|
||||
const group = fonts.map((font, i) => {
|
||||
return FontName({
|
||||
key: font.name,
|
||||
key: font.name + ":" + i,
|
||||
font,
|
||||
onToggleFontHighlight: this.props.onToggleFontHighlight,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user