Fix crasher from empty references list

* See on /en.wikipedia.org/v3/page/html/Manuela_Maleeva/800363347

 * Folow up to 74acc71e

Change-Id: Iae89d4b0073dafce5fe4c28dc94fd6d5779d71c6
This commit is contained in:
Arlo Breault 2017-09-13 18:21:39 -04:00 committed by jenkins-bot
parent 74acc71e98
commit ab0c40f496

View file

@ -537,7 +537,7 @@ References.prototype.insertReferencesIntoDOM = function(refsNode, refsData, nest
if (responsiveWrap) { if (responsiveWrap) {
var div = refsNode.ownerDocument.createElement('div'); var div = refsNode.ownerDocument.createElement('div');
div.classList.add('mw-references-wrap'); div.classList.add('mw-references-wrap');
if (refGroup.refs.length > rrOpts.threshold) { if (refGroup && refGroup.refs.length > rrOpts.threshold) {
div.classList.add('mw-references-columns'); div.classList.add('mw-references-columns');
} }
refsNode.parentNode.insertBefore(div, refsNode); refsNode.parentNode.insertBefore(div, refsNode);