Skip to content

Commit

Permalink
fix(deploy-log-full): undefined package list
Browse files Browse the repository at this point in the history
  • Loading branch information
dr460nf1r3 committed Jun 26, 2024
1 parent e625b9e commit 02b4ca6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/app/deploy-log-full/deploy-log-full.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getDeployments,
headToFullDeployments,
parseDeployments,
startShortPolling,
startShortPolling
} from "@./shared-lib"
import { AfterViewInit, Component } from "@angular/core"
import { FormsModule } from "@angular/forms"
Expand All @@ -23,6 +23,7 @@ export class DeployLogFullComponent implements AfterViewInit {
logAmount: number | undefined
requestedTooMany = false
currentType: DeploymentType = DeploymentType.ALL
firstLoad = true
protected readonly headToFullDeployments = headToFullDeployments

async ngAfterViewInit(): Promise<void> {
Expand All @@ -37,7 +38,7 @@ export class DeployLogFullComponent implements AfterViewInit {
async updateLogAmount(amount: number) {
const newDeployments = parseDeployments(await getDeployments(amount, this.currentType), this.currentType)

if (newDeployments[0].date !== this.latestDeployments[0].date) {
if (this.latestDeployments.length === 0 || newDeployments[0].name !== this.latestDeployments[0]?.name) {
this.latestDeployments = newDeployments

// Show if we requested too many deployments
Expand All @@ -52,6 +53,9 @@ export class DeployLogFullComponent implements AfterViewInit {
notification.classList.add("invisible")
}, 20000)
}
if (this.firstLoad) {
this.firstLoad = false
}
}
}

Expand Down

0 comments on commit 02b4ca6

Please sign in to comment.