From 6df6aad3038b6c56b21c0e4f42151eedb5406243 Mon Sep 17 00:00:00 2001 From: mofux Date: Fri, 14 Jul 2017 18:41:55 +0200 Subject: [PATCH] Improve guard expression for hasSelection --- src/xterm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xterm.js b/src/xterm.js index 6be13675..f82d46b5 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -1437,7 +1437,7 @@ Terminal.prototype.deregisterLinkMatcher = function(matcherId) { * Gets whether the terminal has an active selection. */ Terminal.prototype.hasSelection = function() { - return !!(this.selectionManager && this.selectionManager.hasSelection); + return this.selectionManager ? this.selectionManager.hasSelection : false; }; /**