Skip to content

Commit

Permalink
Sort by episode
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Feb 26, 2024
1 parent edc92ea commit f7d2bf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vignettes/starwars-dynamic.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ This vignette contains some dynamic generated data about the Star Wars films for
function generateMoviesInfo() {
const moviesContainer = document.getElementById('moviesInfo');
moviesData.forEach(movie => {
moviesData.sort((a, b) => a.episode_id - b.episode_id).forEach(movie => {
const movieElement = document.createElement('section');
movieElement.innerHTML = `
<h2 data-id='${movie.episode_id}'>${movie.title}</h2>
Expand Down

0 comments on commit f7d2bf1

Please sign in to comment.