Fix textcomplete reference in autocompletion.disable

This commit is contained in:
Pavel Djundik 2018-01-31 21:06:29 +02:00 committed by GitHub
parent ffa9685b41
commit b765abcb65
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;
}
},
};