Skip to content

Commit

Permalink
Sort slides by container identifier (#112)
Browse files Browse the repository at this point in the history
* Sort slides by container identifier
  • Loading branch information
hackermd authored Jun 22, 2022
1 parent 4c232e9 commit 0964147
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/data/slides.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ const createSlides = (
})
})
slides = slides.sort((a, b) => {
const imageA = a.volumeImages[0]
const imageB = b.volumeImages[0]
if (imageA.SeriesNumber != null && imageB.SeriesNumber != null) {
return Number(imageA.SeriesNumber) - Number(imageB.SeriesNumber)
const imgA = a.volumeImages[0]
const imgB = b.volumeImages[0]
if (imgA.ContainerIdentifier != null && imgB.ContainerIdentifier != null) {
return Number(imgA.ContainerIdentifier) - Number(imgB.ContainerIdentifier)
} else {
return 0
}
Expand Down

0 comments on commit 0964147

Please sign in to comment.