MediaWiki:RefToolbar.js: Difference between revisions

Content deleted Content added
protect against case where there is no date set
check for empty array
Line 485:
//TODO: Autofill the URL, at least for DOI
CiteTB.autoFill = function(data, template, type) {
console.debug(data);
var cl = 'cite-'+template+'-';
var i,j, coauthors;
$('.'+cl+'title').val(data.title);
// Fill in authors
if (data.authors && data.authors.length > 0) {
if ($('.'+cl+'last-incr-1').length != 0) {
var classes = $('.'+cl+'last-incr-1').eq(0).attr('class').split(/\s+/);