瀏覽代碼

fix(toolbox) fix warning due to missing key prop

master
Saúl Ibarra Corretgé 4 年之前
父節點
當前提交
18e2232e9e
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      react/features/toolbox/components/web/Toolbox.js

+ 3
- 3
react/features/toolbox/components/web/Toolbox.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
-import React, { Component } from 'react';
3
+import React, { Component, Fragment } from 'react';
4
 
4
 
5
 import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut';
5
 import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut';
6
 import {
6
 import {
1266
                                         const showSeparator = index > 0 && arr[index - 1].group !== group;
1266
                                         const showSeparator = index > 0 && arr[index - 1].group !== group;
1267
 
1267
 
1268
                                         return (key !== 'raisehand' || !_reactionsEnabled)
1268
                                         return (key !== 'raisehand' || !_reactionsEnabled)
1269
-                                            && <>
1269
+                                            && <Fragment key = { `f${key}` }>
1270
                                                 {showSeparator && <Separator key = { `hr${group}` } />}
1270
                                                 {showSeparator && <Separator key = { `hr${group}` } />}
1271
                                                 <Content
1271
                                                 <Content
1272
                                                     { ...rest }
1272
                                                     { ...rest }
1273
                                                     key = { key }
1273
                                                     key = { key }
1274
                                                     showLabel = { true } />
1274
                                                     showLabel = { true } />
1275
-                                            </>
1275
+                                            </Fragment>
1276
                                         ;
1276
                                         ;
1277
                                     })}
1277
                                     })}
1278
                                 </ul>
1278
                                 </ul>

Loading…
取消
儲存