Merge pull request #2023 from thelounge/xpaw/textcomplete-null

Fix textcomplete reference in autocompletion.disable
This commit is contained in:
Jérémie Astori 2018-02-01 00:31:03 -05:00 committed by GitHub
commit 4f737ce5bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
},
};