mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
Never show an empty table of contents
This doesn't seem to have got updated when we revised the data format in T299065. Bug: T303860 Change-Id: Ib955950e014668fe434da4a1654e977eb43f7dd8
This commit is contained in:
parent
2e48d378f0
commit
f3f777818c
|
@ -682,7 +682,9 @@ class SkinVector extends SkinMustache {
|
|||
* @return array
|
||||
*/
|
||||
private function getTocData( array $tocData ): array {
|
||||
if ( empty( $tocData ) ) {
|
||||
// If the table of contents has no items, we won't output it.
|
||||
// empty array is interpreted by Mustache as falsey.
|
||||
if ( empty( $tocData ) || empty( $tocData[ 'array-sections' ] ) ) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue