Prevent the initialIndex from being less than 0 (#5501)

This commit is contained in:
Elias Nahum 2021-06-29 14:32:40 -04:00 committed by GitHub
parent 65a14f309b
commit 4489906698
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,7 @@ function mapStateToProps() {
return {
deepLinkURL: state.views.root.deepLinkURL,
postIds: ids,
initialIndex,
initialIndex: Math.max(initialIndex, 0),
serverURL: getCurrentUrl(state),
siteURL: getConfig(state)?.SiteURL,
theme: getTheme(state),