mirror of https://github.com/laurent22/joplin.git
Plugins: Fixed issue with toolbar button key not being unique
parent
e0c2b62a6c
commit
ee912b24c7
|
@ -41,14 +41,14 @@ export default function styles(props: Props) {
|
|||
leftIcon: {
|
||||
fontSize: iconSize,
|
||||
position: 'relative',
|
||||
top: 2,
|
||||
top: 1,
|
||||
color: theme.color3,
|
||||
},
|
||||
rightIcon: {
|
||||
fontSize: iconSize - 1,
|
||||
borderLeft: 'none',
|
||||
position: 'relative',
|
||||
top: 2,
|
||||
top: 1,
|
||||
color: theme.color3,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -40,6 +40,7 @@ class ToolbarBaseComponent extends React.Component<Props, any> {
|
|||
const o = this.props.items[i];
|
||||
let key = o.iconName ? o.iconName : '';
|
||||
key += o.title ? o.title : '';
|
||||
key += o.name ? o.name : '';
|
||||
const itemType = !('type' in o) ? 'button' : o.type;
|
||||
|
||||
if (!key) key = `${o.type}_${i}`;
|
||||
|
|
Loading…
Reference in New Issue