X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=b44f19e2822e6cf498f1ec1b53b1baf95b37d52b;hp=0d1772e6532099b18cc92e65ecf797a0b8b9d0e8;hb=1a7c78f5bf78ad39d3b3c8c32a87749750cae14b;hpb=7554e62e2d7a4b21f500c63f1c071d44daa6803a diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 0d1772e..b44f19e 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -677,8 +677,11 @@ function loadNewPost(postId) { if (postId in loadedPosts) { return; } - loadedPosts[postId] = true; $.getJSON("getPost.ajax", { "post" : postId }, function(data, textStatus) { + if (postId in loadedPosts) { + return; + } + loadedPosts[postId] = true; if ((data != null) && data.success) { if (!isIndexPage() && !(isViewSonePage() && ((getShownSoneId() == data.post.sone) || (getShownSoneId() == data.post.recipient)))) { return;