mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-03 03:55:26 +03:00
Fixed duplicate key errors in admin-x
refs https://github.com/TryGhost/Team/issues/3151 - adds unique key to global heading element
This commit is contained in:
parent
95cfabb271
commit
0167952949
@ -28,7 +28,7 @@ const Heading: React.FC<IHeading> = ({level, children, styles, grey, separator,
|
||||
const newElement = `${useLabelTag ? 'label' : `h${level}`}`;
|
||||
styles += (level === 6 || useLabelTag) ? (` block text-2xs font-semibold uppercase tracking-wide ${(grey && 'text-grey-700')}`) : ' ';
|
||||
|
||||
const Element = React.createElement(newElement, {className: styles, ...props}, children);
|
||||
const Element = React.createElement(newElement, {className: styles, key: 'heading-elem', ...props}, children);
|
||||
|
||||
if (separator) {
|
||||
let gap = (!level || level === 1) ? 2 : 1;
|
||||
|
Loading…
Reference in New Issue
Block a user