minor, menuCloseFunction

Fixes 'TypeError: this.saveDrawingSubMenu is undefined'
This commit is contained in:
abakkk 2020-02-09 16:43:21 +01:00
parent e0ce5e0096
commit 528a62fa57
1 changed files with 1 additions and 1 deletions

View File

@ -1170,7 +1170,7 @@ var DrawingMenu = new Lang.Class({
// Since escape key press event can't be captured easily, the job is done in the menu close function.
let menuCloseFunc = this.menu.close;
this.menu.close = (animate) => {
if (this.saveDrawingSubMenu.isOpen)
if (this.saveDrawingSubMenu && this.saveDrawingSubMenu.isOpen)
this.saveDrawingSubMenu.close();
menuCloseFunc.bind(this.menu)(animate);
};