Skip to content

Commit

Permalink
Handle undefined-diffs case
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Oct 8, 2024
1 parent f74bef3 commit 5804fe9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/app/controllers/jobs/job/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ export default class VersionsController extends Controller.extend(
@action async versionsDidUpdate() {
try {
const diffs = await this.job.getVersions(this.diffVersion);
this.diffs = diffs.Diffs;
if (diffs.Diffs) {
this.diffs = diffs.Diffs;
} else {
this.diffs = [];
}
} catch (error) {
console.error('error fetching diffs', error);
}
Expand Down

0 comments on commit 5804fe9

Please sign in to comment.