From 9a30b98880fe2fc511b077f20994702ed7301ce5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 25 Jul 2017 10:45:45 +0200 Subject: [PATCH] safeguard npe --- src/xterm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xterm.js b/src/xterm.js index 8685cbad..b0ed3eb7 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -517,7 +517,7 @@ Terminal.prototype.initGlobal = function() { on(this.element, 'copy', event => { // If mouse events are active it means the selection manager is disabled and // copy should be handled by the host program. - if (!this.selectionManager.hasSelection) { + if (!term.hasSelection) { return; } copyHandler(event, term, this.selectionManager);