From c7a8412b3edea146079055e734f7128ba8c1d4ac Mon Sep 17 00:00:00 2001 From: bytedream <63594396+bytedream@users.noreply.github.com> Date: Mon, 25 Mar 2024 19:56:14 +0100 Subject: [PATCH] Refactor `.length > 0` pattern Co-authored-by: silverwind --- web_src/js/components/RepoActionView.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index a8735baa8b..e2c37e5d64 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -200,7 +200,7 @@ const sfc = { } // scrolls to the bottom if job is running and the bottom of the logs container is visible - if (!this.run.done && logLines.length > 0 && clientHeight >= logsContainerHeight) { + if (!this.run.done && logLines.length && clientHeight >= logsContainerHeight) { const newLogsContainerHeight = this.$refs.stepsContainer.getBoundingClientRect().bottom + window.scrollY; window.scrollTo({top: clientHeight + (newLogsContainerHeight - logsContainerHeight), behavior: 'smooth'}); }