Fixed a potential source of duplicate key
Brian Vaughn committed
Feb 14, 2019 at 15:06 UTC
04a0d24f0f78c5a87df6a3dda8511f3cdc5f81a8
1 file changed
+2
-2
src/devtools/views/InspectedElementTree.js
+2
-2
@@ -97,7 +97,7 @@ function KeyValue({ depth, name, value }: KeyValueProps) {
97
));
98
children.unshift(
99
<div
100
- key="root"
100
+ key={`${depth}-root`}
101
className={styles.Item}
102
style={{ paddingLeft: `${depth}rem` }}
103
>
@@ -110,7 +110,7 @@ function KeyValue({ depth, name, value }: KeyValueProps) {
110
));
111
children.unshift(
112
<div
113
- key="root"
113
+ key={`${depth}-root`}
114
className={styles.Item}
115
style={{ paddingLeft: `${depth}rem` }}
116
>