From 681176ce31554bee9f606d391ac72d6793fbdb6b Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 29 Aug 2018 15:39:18 +0300 Subject: [PATCH] use showHelp.close when it's defined fixes #485 --- edit/beautify.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edit/beautify.js b/edit/beautify.js index 32220bde..50ef5553 100644 --- a/edit/beautify.js +++ b/edit/beautify.js @@ -40,7 +40,8 @@ function beautify(event) { $create('.buttons', [ $create('button', { attributes: {role: 'close'}, - onclick: showHelp.close, + // showHelp.close will be defined after showHelp() is invoked + onclick: () => showHelp.close(), }, t('confirmClose')), $create('button', { attributes: {role: 'undo'},