posts: fix tag scripts not working.
If the `size` URL param wasn't present, then `size=null` would be passed
to `/posts/:id.js`, which would fail because `null` wasn't a valid size.
Regression in 8841de68ac.
This commit is contained in:
@@ -413,7 +413,7 @@ Post.update = async function(post_id, mode, params) {
|
||||
let view = urlParams.get("view");
|
||||
let size = urlParams.get("size");
|
||||
|
||||
await $.ajax({ type: "PUT", url: `/posts/${post_id}.js?mode=${mode}&view=${view}&size=${size}`, data: params });
|
||||
await $.ajax({ type: "PUT", url: `/posts/${post_id}.js`, data: { mode, view, size, ...params }});
|
||||
|
||||
Post.pending_update_count -= 1;
|
||||
Post.show_pending_update_notice();
|
||||
|
||||
Reference in New Issue
Block a user