mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
fix: check tid in event handlers client side
This commit is contained in:
@@ -96,7 +96,7 @@ define('forum/topic/events', [
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onPostEdited(data) {
|
function onPostEdited(data) {
|
||||||
if (!data || !data.post) {
|
if (!data || !data.post || parseInt(data.post.tid, 10) !== parseInt(ajaxify.data.tid, 10)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var editedPostEl = components.get('post/content', data.post.pid).filter(function (index, el) {
|
var editedPostEl = components.get('post/content', data.post.pid).filter(function (index, el) {
|
||||||
@@ -174,6 +174,9 @@ define('forum/topic/events', [
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onPostPurged(postData) {
|
function onPostPurged(postData) {
|
||||||
|
if (!postData || parseInt(postData.tid, 10) !== parseInt(ajaxify.data.tid, 10)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
components.get('post', 'pid', postData.pid).fadeOut(500, function () {
|
components.get('post', 'pid', postData.pid).fadeOut(500, function () {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
posts.showBottomPostBar();
|
posts.showBottomPostBar();
|
||||||
|
|||||||
Reference in New Issue
Block a user