diff --git a/edit/beautify.js b/edit/beautify.js index 830b7e71..5be10608 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'},