From b765abcb657479a66f62c00527b70353acc5fd6a Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 31 Jan 2018 21:06:29 +0200 Subject: [PATCH] Fix textcomplete reference in autocompletion.disable --- client/js/autocompletion.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/js/autocompletion.js b/client/js/autocompletion.js index 50f0c920..fc3e8f48 100644 --- a/client/js/autocompletion.js +++ b/client/js/autocompletion.js @@ -16,7 +16,11 @@ module.exports = { disable: () => { input.unbind("input.tabcomplete"); Mousetrap(input.get(0)).unbind("tab", "keydown"); - textcomplete.destroy(); + + if (textcomplete) { + textcomplete.destroy(); + textcomplete = null; + } }, };