variable name conflict

This commit is contained in:
Tyler Murphy 2023-01-23 22:16:53 -05:00
parent 63db4bd8ab
commit 03b5e452a0

View file

@ -179,23 +179,23 @@ const getPosts = (ids) => {
const getUsersPosts = (user) => {
const fast = users_posts[user]
if (fast === NO_CACHE) {
const posts = database.getUsersPosts(user)
if (posts === undefined) {
const p = database.getUsersPosts(user)
if (p === undefined) {
users_posts[user] = NO_VALUE
} else {
const slow = []
for (const post in posts) {
slow.push[post.id]
for (const post of p) {
slow.push(post.id)
if (posts[post.id] === NO_CACHE) {
posts[post.id] = post
}
}
users_posts[user] = slow
}
return posts
return p
} else {
const posts = getPosts(fast)
return Object.keys(posts).map(k => posts[k]).filler(p => p !== null)
return Object.keys(posts).map(k => posts[k]).filter(p => p !== undefined)
}
}