refactor: remove uncessary check

v1.18.x
Barış Soner Uşaklı 4 years ago
parent e789fe8d2a
commit f316c4d4b8

@ -23,7 +23,7 @@ module.exports = function (Posts) {
fields: fields,
});
result.posts.forEach(post => modifyPost(post, fields));
return Array.isArray(result.posts) ? result.posts : null;
return result.posts;
};
Posts.getPostData = async function (pid) {

Loading…
Cancel
Save