Skip to content

Commit

Permalink
Fix incorrect order of operations and a few other errors in ProgressD…
Browse files Browse the repository at this point in the history
…isplay
  • Loading branch information
inkfarer committed Apr 14, 2024
1 parent 3a67cb7 commit 79c793c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/log/ProgressDisplay.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<ipl-progress-bar
v-show="progress != null"
v-if="progress != null"
:value="progress"
:color="progressBarColor"
background-color="primary"
Expand Down Expand Up @@ -34,15 +34,15 @@ export default defineComponent({
return {
progress: computed(() => {
const entry = logStore.progressEntries[props.logKey]
if (entry.maxStep == null) {
if (entry?.maxStep == null) {
return null
}
if (actionState.value != null && actionState.value !== ActionState.INCOMPLETE) {
return 100
}
return !entry ? 0 : (entry.step ?? 0 / entry.maxStep) * 100
return !entry ? 0 : ((entry.step ?? 0) / entry.maxStep) * 100
}),
progressBarColor: computed(() => {
switch (actionState.value) {
Expand Down

0 comments on commit 79c793c

Please sign in to comment.