mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-17 09:25:50 +00:00
Fix minor loading bug.
This commit is contained in:
parent
7275e127cc
commit
a27badefba
20
ui/src/utils.ts
vendored
20
ui/src/utils.ts
vendored
@ -613,11 +613,13 @@ export function createPostLikeFindRes(data: PostResponse, posts: Array<Post>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function createPostLikeRes(data: PostResponse, post: Post) {
|
export function createPostLikeRes(data: PostResponse, post: Post) {
|
||||||
post.score = data.post.score;
|
if (post) {
|
||||||
post.upvotes = data.post.upvotes;
|
post.score = data.post.score;
|
||||||
post.downvotes = data.post.downvotes;
|
post.upvotes = data.post.upvotes;
|
||||||
if (data.post.my_vote !== null) {
|
post.downvotes = data.post.downvotes;
|
||||||
post.my_vote = data.post.my_vote;
|
if (data.post.my_vote !== null) {
|
||||||
|
post.my_vote = data.post.my_vote;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -629,9 +631,11 @@ export function editPostFindRes(data: PostResponse, posts: Array<Post>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function editPostRes(data: PostResponse, post: Post) {
|
export function editPostRes(data: PostResponse, post: Post) {
|
||||||
post.url = data.post.url;
|
if (post) {
|
||||||
post.name = data.post.name;
|
post.url = data.post.url;
|
||||||
post.nsfw = data.post.nsfw;
|
post.name = data.post.name;
|
||||||
|
post.nsfw = data.post.nsfw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function commentsToFlatNodes(
|
export function commentsToFlatNodes(
|
||||||
|
Loading…
Reference in New Issue
Block a user