From 4914f51b6efc75c4bdc003da1874b6727d2abfc6 Mon Sep 17 00:00:00 2001 From: sundasnoreen12 <72802712+sundasnoreen12@users.noreply.github.com> Date: Thu, 28 Mar 2024 13:30:50 +0500 Subject: [PATCH] fix: fixed crash issue for post in learner tab (#684) --- src/discussions/posts/data/slices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discussions/posts/data/slices.js b/src/discussions/posts/data/slices.js index 2638dfddb..ee97cd601 100644 --- a/src/discussions/posts/data/slices.js +++ b/src/discussions/posts/data/slices.js @@ -185,7 +185,7 @@ const threadsSlice = createSlice({ }, pages: !payload.anonymousToPeers ? [ - ...[payload.id].concat(state.pages[0]) || [], + ...(state.pages[0] ? [payload.id].concat(state.pages[0]) : []), ...state.pages.slice(1), ] : [...state.pages],