Alex krasn/bugfix on hotkeys when canvas not loaded yet (#664)
* fix: zoomIn keyboar shortcut for macOS * fix: appId * fix: error, handle not yet loaded canvas
This commit is contained in:
Родитель
7166cdae57
Коммит
b0404c6276
|
@ -501,7 +501,7 @@ export default class EditorPage extends React.Component<IEditorPageProps, IEdito
|
|||
*/
|
||||
private handleTagHotKey = (event: KeyboardEvent): void => {
|
||||
const tag = this.getTagFromKeyboardEvent(event);
|
||||
const selection = this.canvas.current.getSelectedRegions();
|
||||
const selection = this.canvas?.current?.getSelectedRegions();
|
||||
|
||||
if (tag && selection.length) {
|
||||
const { format, type, documentCount, name } = tag;
|
||||
|
|
Загрузка…
Ссылка в новой задаче