Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
player
Commits
e6f8b3c0
Commit
e6f8b3c0
authored
May 31, 2022
by
David Trattnig
Browse files
Fix: Correct rendering of all episodes
parent
483c2373
Pipeline
#1984
passed with stages
in 10 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/ShowDetail.svelte
View file @
e6f8b3c0
...
...
@@ -138,14 +138,15 @@
/** Process the API Episodes results when "Load More" was initiated */
function processMoreEpisodes(data) {
if (data && data.error) {
console.log('No more episodes to load:', data.error)
// #FIXME API should handle 0 records not as an error / this case should compare for 0 records
hasMoreEpisodes = false
show = tmp_show
return
data = []
}
// #TODO The episodes should be provided ordered ascending by the API already (Ability to sort)
if (data != null && Array.isArray(data)) data = data.reverse()
episodes = episodesNext.concat(episodes.concat(data))
data.unshift(episodes[0])
episodes = episodesNext.concat(data)
labelEpisodes = labelAllEpisodes
hasMoreEpisodes = false
console.log('More episodes of show API response:', data)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment