From e133e2607e1b1e9bf846ac8c4b4671a96383527c Mon Sep 17 00:00:00 2001 From: Johnson Mao Date: Thu, 7 Mar 2024 23:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20facebook=20api=20to=20hand?= =?UTF-8?q?le=20error=20payloads=20properly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- redux/reducers/shared.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redux/reducers/shared.js b/redux/reducers/shared.js index 1bbda869..48aa58a8 100644 --- a/redux/reducers/shared.js +++ b/redux/reducers/shared.js @@ -49,14 +49,14 @@ const reducer = (state = initialState, action) => { case 'GET_INSTAGRAM_POST_SUCCESS': { return { ...state, - instagramPosts: action.payload, + instagramPosts: Array.isArray(action.payload) ? action.payload : [], isLoadingInstagramPosts: false, }; } case 'GET_INSTAGRAM_STORY_SUCCESS': { return { ...state, - instagramStories: action.payload, + instagramStories: Array.isArray(action.payload) ? action.payload : [], isLoadingInstagramStories: false, }; }