diff --git a/Site Web/client/src/components/Post/DisplayPost/DisplayPostLikeProfil.js b/Site Web/client/src/components/Post/DisplayPost/DisplayPostLikeProfil.js
index af9debbd..dd417457 100644
--- a/Site Web/client/src/components/Post/DisplayPost/DisplayPostLikeProfil.js
+++ b/Site Web/client/src/components/Post/DisplayPost/DisplayPostLikeProfil.js
@@ -19,7 +19,7 @@ const DisplayPostLikeProfil = () => {
return (
- {!isEmpty(postsData[0]) &&
+ {!isEmpty(postsData) &&
postsData.filter(post => post.likers.includes(uid))
.map((post) => {
return
diff --git a/Site Web/client/src/components/Post/DisplayPost/NouveauDisplayPosts.js b/Site Web/client/src/components/Post/DisplayPost/NouveauDisplayPosts.js
index 13eab004..b28a18af 100644
--- a/Site Web/client/src/components/Post/DisplayPost/NouveauDisplayPosts.js
+++ b/Site Web/client/src/components/Post/DisplayPost/NouveauDisplayPosts.js
@@ -22,7 +22,7 @@ const NouveauDisplayPosts = () => {
return (
- {!isEmpty(postsData[0]) &&
+ {!isEmpty(postsData) &&
postsData.map((post) => {
if(post.postedId === uid){
return
diff --git a/Site Web/client/src/components/Post/DisplayPosts.js b/Site Web/client/src/components/Post/DisplayPosts.js
index 52a3e264..9e62b259 100644
--- a/Site Web/client/src/components/Post/DisplayPosts.js
+++ b/Site Web/client/src/components/Post/DisplayPosts.js
@@ -34,7 +34,7 @@ const DisplayPosts = ( {type} ) => {
return (
- {!isEmpty(postsData) && !isEmpty(postsData[0]) &&
+ {!isEmpty(postsData) && !isEmpty(postsData) &&
postsData.map((post) => {
return
})}
diff --git a/Site Web/client/src/components/Post/PostNouvelleAffichage.js b/Site Web/client/src/components/Post/PostNouvelleAffichage.js
index 0243cab8..a66f614b 100644
--- a/Site Web/client/src/components/Post/PostNouvelleAffichage.js
+++ b/Site Web/client/src/components/Post/PostNouvelleAffichage.js
@@ -47,7 +47,7 @@ const PostNouvelleAffichage = ( { post } ) => {
useEffect(() => {
try {
- !isEmpty(usersData[0]) && setIsLoading(false)
+ !isEmpty(usersData) && setIsLoading(false)
}
catch (error){
diff --git a/Site Web/client/src/components/UserProfil/SuggestFriends.js b/Site Web/client/src/components/UserProfil/SuggestFriends.js
index 2a5c50b0..b6f8ec0a 100644
--- a/Site Web/client/src/components/UserProfil/SuggestFriends.js
+++ b/Site Web/client/src/components/UserProfil/SuggestFriends.js
@@ -55,7 +55,7 @@ const SuggestFriends = () => {
setFriends(array);
}
- if(change && !isEmpty(usersData[0]) && userData!=null){
+ if(change && !isEmpty(usersData) && userData!=null){
if(userData.followers.length === 0){
stateTopFollowers();
}else{
diff --git a/Site Web/models/post.model.js b/Site Web/models/post.model.js
index d9c41188..a9d8e061 100644
--- a/Site Web/models/post.model.js
+++ b/Site Web/models/post.model.js
@@ -20,7 +20,7 @@ const postSchema = new mongoose.Schema(
likers: {
type: [String],
required: true
- },-
+ },
tags: {
type: [String],
required: true