mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Refactor .length > 0
pattern
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
17f351b68e
commit
c7a8412b3e
@ -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'});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user