From 4489906698ebf04ad035e31d949c730ea4507b6b Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Tue, 29 Jun 2021 14:32:40 -0400 Subject: [PATCH] Prevent the initialIndex from being less than 0 (#5501) --- app/components/post_list/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/post_list/index.ts b/app/components/post_list/index.ts index c15025ca0..f1326995d 100644 --- a/app/components/post_list/index.ts +++ b/app/components/post_list/index.ts @@ -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),