Skip to content

Commit 958d82b

Browse files
committed
Fetch release notes and auto-skip step if none are available
1 parent e1482a5 commit 958d82b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

stores/firmwareStore.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,16 @@ export const useFirmwareStore = defineStore('firmware', {
224224
this.manifest = undefined
225225
this.releaseManifest = undefined
226226

227+
// Fetch release notes if not already present
228+
if (firmware.id && (!firmware.release_notes || firmware.release_notes.trim().length === 0)) {
229+
firmware.release_notes = await fetchReleaseNotes(firmware.id)
230+
}
231+
232+
// Auto-skip release notes step if there are no notes to show
233+
if (!firmware.release_notes || firmware.release_notes.trim().length === 0) {
234+
this.hasSeenReleaseNotes = true
235+
}
236+
227237
// Fetch the release manifest that lists all available targets
228238
if (firmware.id) {
229239
const releaseManifest = await fetchReleaseManifest(firmware.id)

0 commit comments

Comments
 (0)