From 88e3562e6536cc0a91dbbb9f65e59036e4b73b79 Mon Sep 17 00:00:00 2001 From: IepIweidieng <37586669+IepIweidieng@users.noreply.github.com> Date: Sat, 23 Nov 2019 15:02:44 +0800 Subject: [PATCH] fix(js/term_view): fix crash when user right-click while selecting all --- src/js/term_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/term_view.js b/src/js/term_view.js index 3562eaad..04db9aed 100644 --- a/src/js/term_view.js +++ b/src/js/term_view.js @@ -650,7 +650,7 @@ TermView.prototype = { }, getRowLineElement: function(node) { - for (let r = node; r != r.parentNode; r = r.parentNode) { + for (let r = node; r && r != r.parentNode; r = r.parentNode) { if (r instanceof Element && r.getAttribute('data-type') == 'bbsline') { return r;