HFP-2052 Fix undefined source
parent
e179ec2934
commit
17162f32ef
|
@ -1096,7 +1096,7 @@ H5P.buildMetadataCopyrights = function (metadata, contentTypeName) {
|
||||||
var dataset = {
|
var dataset = {
|
||||||
title: metadata.title,
|
title: metadata.title,
|
||||||
author: (metadata.authors && metadata.authors.length > 0) ? metadata.authors.map(function(author) {return author.name + ' (' + author.role + ')';}).join(', ') : undefined,
|
author: (metadata.authors && metadata.authors.length > 0) ? metadata.authors.map(function(author) {return author.name + ' (' + author.role + ')';}).join(', ') : undefined,
|
||||||
source: '<a href="' + metadata.source + '" target="_blank">' + metadata.source + '</a>',
|
source: (metadata.source) ? '<a href="' + metadata.source + '" target="_blank">' + metadata.source + '</a>' : undefined,
|
||||||
year: (metadata.yearFrom) ? (metadata.yearFrom + ((metadata.yearTo) ? '-' + metadata.yearTo: '')) : undefined,
|
year: (metadata.yearFrom) ? (metadata.yearFrom + ((metadata.yearTo) ? '-' + metadata.yearTo: '')) : undefined,
|
||||||
license: metadata.license,
|
license: metadata.license,
|
||||||
version: metadata.licenseVersion,
|
version: metadata.licenseVersion,
|
||||||
|
|
Loading…
Reference in New Issue