fix(notify-button-clicked) Fix crash on mobile browsers

This commit is contained in:
hmuresan 2021-11-17 17:35:03 +02:00 committed by Saúl Ibarra Corretgé
parent fe8e2c18bc
commit 213a5fb89a
1 changed files with 4 additions and 1 deletions

View File

@ -797,7 +797,10 @@ class Toolbox extends Component<Props> {
}
Object.values(buttons).forEach((button: any) => {
if (this.props._buttonsWithNotifyClick.includes(button.key)) {
if (
typeof button === 'object'
&& this.props._buttonsWithNotifyClick.includes(button.key)
) {
button.handleClick = () => APP.API.notifyToolbarButtonClicked(button.key);
}
});