Skip to content

Commit d728c89

Browse files
committed
fixing contributor logic
1 parent 6963fc2 commit d728c89

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

public/javascripts/DV/helpers/construction.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ _.extend(DV.Schema.helpers, {
2323
var pdfURL = doc.resources.pdf;
2424
pdfURL = pdfURL && this.viewer.options.pdf !== false ? '<a target="_blank" href="' + pdfURL + '">Original Document (PDF) &raquo;</a>' : '';
2525

26-
var contributorList = '' + this.viewer.schema.document.contributor +', '+ this.viewer.schema.document.contributor_organization;
26+
var contribs = doc.contributor && doc.contributor_organization &&
27+
('' + doc.contributor + ', '+ doc.contributor_organization);
2728

2829
var showAnnotations = this.showAnnotations();
2930
var printNotesURL = (showAnnotations) && doc.resources.print_annotations;
@@ -34,7 +35,7 @@ _.extend(DV.Schema.helpers, {
3435
header: headerHTML,
3536
footer: footerHTML,
3637
pdf_url: pdfURL,
37-
contributors: contributorList,
38+
contributors: contribs,
3839
story_url: storyURL,
3940
print_notes_url: printNotesURL,
4041
descriptionContainer: JST.descriptionContainer({ description: description}),

0 commit comments

Comments
 (0)