Fix approval notice not displaying if using shift+o shortcut

This commit is contained in:
Toks
2016-01-13 11:43:54 -05:00
parent 29547a1ffe
commit e9d79b7ae0

View File

@@ -514,8 +514,10 @@
Danbooru.error("Error: " + data.reason);
} else {
var $post = $("#post_" + post_id);
$post.data("flags", $post.data("flags").replace(/pending/, ""));
$post.removeClass("post-status-pending");
if ($post.length) {
$post.data("flags", $post.data("flags").replace(/pending/, ""));
$post.removeClass("post-status-pending");
}
Danbooru.notice("Approved post #" + post_id);
$("#pending-approval-notice").hide();
}