EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/100603


Change subject: Dont throw javascript errors with invalid anchor
......................................................................

Dont throw javascript errors with invalid anchor

Change-Id: I872b17ed5e2be8cde0fe20b910ed14ff1c951a83
---
M modules/discussion/ui.js
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/03/100603/1

diff --git a/modules/discussion/ui.js b/modules/discussion/ui.js
index a9420ec..aa5385f 100644
--- a/modules/discussion/ui.js
+++ b/modules/discussion/ui.js
@@ -316,6 +316,9 @@
                var highlightPost = function( $elem ) {
                        var $viewport = $( 'main, html' );
 
+                       if ( !$elem.length ) {
+                               return;
+                       }
                        $container.find( '.flow-post-highlighted' 
).removeClass( 'flow-post-highlighted' );
                        $elem
                                .closest( '.flow-post-container' )

-- 
To view, visit https://gerrit.wikimedia.org/r/100603
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I872b17ed5e2be8cde0fe20b910ed14ff1c951a83
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to