variable name conflict
This commit is contained in:
parent
63db4bd8ab
commit
03b5e452a0
1 changed files with 6 additions and 6 deletions
12
src/cache.js
12
src/cache.js
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue