From 8ca977e51992e1e14438e52c660d8b94d8d526c4 Mon Sep 17 00:00:00 2001 From: Cblair91 Date: Sat, 30 Apr 2016 10:32:25 +0000 Subject: [PATCH] Better JavaScript handling for return method The length selector can be reduced to just find the child of $tbody, as it will check to see if both $tbody and the child .collapsible exist. Change-Id: If927a5ca79d12f4654a1af9bad97c9274cb501e9 --- .../src/mediawiki.action/mediawiki.action.view.metadata.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/src/mediawiki.action/mediawiki.action.view.metadata.js b/resources/src/mediawiki.action/mediawiki.action.view.metadata.js index b1a63b0506..4c75e333f5 100644 --- a/resources/src/mediawiki.action/mediawiki.action.view.metadata.js +++ b/resources/src/mediawiki.action/mediawiki.action.view.metadata.js @@ -14,7 +14,7 @@ $table = $( '#mw_metadata' ), $tbody = $table.find( 'tbody' ); - if ( !$tbody.length || !$tbody.find( '.collapsable' ).length ) { + if ( !$tbody.find( '.collapsable' ).length ) { return; } -- 2.20.1