From 901c96a96026bd6e7c0510e908bb779e232dc5e5 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilev Date: Mon, 17 Oct 2022 16:07:38 +0800 Subject: [PATCH] fix --- src/calltree.js | 3 +++ src/editor/logs.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calltree.js b/src/calltree.js index 46d4262..a3dfce7 100644 --- a/src/calltree.js +++ b/src/calltree.js @@ -769,6 +769,9 @@ const select_arguments = (state, with_focus = true) => { } const navigate_logs_increment = (state, increment) => { + if(state.logs.logs.length == 0) { + return {state} + } const index = Math.max( Math.min( diff --git a/src/editor/logs.js b/src/editor/logs.js index 86c2637..4558818 100644 --- a/src/editor/logs.js +++ b/src/editor/logs.js @@ -73,7 +73,7 @@ export class Logs { } if(prev_logs?.log_position != logs.log_position) { - if(prev_logs?.log_position != null) { + if(prev_logs?.logs == logs.logs && prev_logs?.log_position != null) { this.el.children[prev_logs.log_position].classList.remove('active') } if(logs.log_position != null) {