HFP-2052 Fix undefined source

pull/52/head
Oliver Tacke 2018-06-20 16:25:27 +02:00
parent e179ec2934
commit 17162f32ef
1 changed files with 1 additions and 1 deletions

View File

@ -1096,7 +1096,7 @@ H5P.buildMetadataCopyrights = function (metadata, contentTypeName) {
var dataset = {
title: metadata.title,
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,
license: metadata.license,
version: metadata.licenseVersion,