Fix author page lists not loading #11086
Merged
+8
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #11085
Addresses bug which prevents lists from loading on author and orphaned edition pages.
Technical
The My Books Droppers that are rendered on author page sidebars are not associated with a work ID (the same is true for droppers on orphaned edition pages). The HTML for the check-in components is not rendered for these droppers, as check-ins require a work ID.
Whenever
this.checkInComponents.initialize()was called by a dropper that didn't include the check-in HTML, it threw an exception that prevented theinitMyBooksAffordancesfunction from fetching the list data and updating the view.Now, if there is no check-in HTML included with a dropper, we set
this.checkInComponentstonulland check for the object before callinginitialize(). This null check is only needed here, as it is present in all other places wherethis.checkInComponentsis referenced.Testing
Screenshot
Stakeholders