votes: fix bug with tag scripting in show score mode.

Fix a bug where scores would disappear when applying tag scripts in show
scores mode.
This commit is contained in:
evazion
2021-11-28 01:26:09 -06:00
parent 9591fa1302
commit 59f8320d91
2 changed files with 5 additions and 2 deletions

View File

@@ -409,7 +409,10 @@ Post.update = async function(post_id, mode, params) {
Post.pending_update_count += 1;
Post.show_pending_update_notice()
await $.ajax({ type: "PUT", url: `/posts/${post_id}.js?mode=${mode}`, data: params });
let urlParams = new URLSearchParams(window.location.search);
let view = urlParams.get("view");
await $.ajax({ type: "PUT", url: `/posts/${post_id}.js?mode=${mode}&view=${view}`, data: params });
Post.pending_update_count -= 1;
Post.show_pending_update_notice();