Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/modules/Post/PostReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const PostReducer = (state = initialState, action) => {
export const getPosts = state => state.posts.data;

// Get post by cuid
export const getPost = (state, cuid) => state.posts.data.filter(post => post.cuid === cuid)[0];
export const getPost = (state, cuid) => state.posts.data.find(post => post.cuid === cuid);

// Export Reducer
export default PostReducer;