Improve guard expression for hasSelection

This commit is contained in:
mofux
2017-07-14 18:41:55 +02:00
parent 0af4b17c20
commit 6df6aad303
+1 -1
View 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;
};
/**