]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Improve guard expression for hasSelection
authormofux <t.zilz@mofux.org>
Fri, 14 Jul 2017 16:41:55 +0000 (18:41 +0200)
committermofux <t.zilz@mofux.org>
Fri, 14 Jul 2017 16:41:55 +0000 (18:41 +0200)
src/xterm.js

index 6be1367598c4b6b7ad3d916bc9bc22bb74dae078..f82d46b5eddae3070775aea6c134b701e2bfa524 100644 (file)
@@ -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;
 };
 
 /**