can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r18824: LJSUP-8534: incorrectly minimized thread...

Committer: dpetrov
LJSUP-8534: incorrectly minimized thread, after adding the comments
U   trunk/htdocs/js/commentmanage.js
U   trunk/htdocs/js/thread_expander.ex.js
Modified: trunk/htdocs/js/commentmanage.js
===================================================================
--- trunk/htdocs/js/commentmanage.js	2011-04-08 07:34:25 UTC (rev 18823)
+++ trunk/htdocs/js/commentmanage.js	2011-04-08 07:56:34 UTC (rev 18824)
@@ -641,6 +641,10 @@
 	LiveJournal.CommentManager.processThreadJSON = function( result, callback ) {
 		var comment, dom;
 		for( var i = 0; i < result.length; ++i ){
+			if( !( result[ i ].thread in LJ_cmtinfo ) ) {
+				continue;
+			}
+	
 			comment = {};
 			comment.is_deleted = ( result[i].state === "deleted" );
 			if( comment.is_deleted ) {

Modified: trunk/htdocs/js/thread_expander.ex.js
===================================================================
--- trunk/htdocs/js/thread_expander.ex.js	2011-04-08 07:34:25 UTC (rev 18823)
+++ trunk/htdocs/js/thread_expander.ex.js	2011-04-08 07:56:34 UTC (rev 18824)
@@ -124,6 +124,9 @@
         if( json[ i ].state === 'deleted' ) {
             LJ_cmtinfo[ json[ i ].thread ].is_deleted = true;
         }
+		if( !( json[ i ].thread in LJ_cmtinfo ) ) {
+			continue;
+		}
         if( json[ i ].state && json[ i ].state !== "expanded") {
             continue;
         }

Tags: can3p, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments