From 6f8acb90d96229c6496070e540f4b088d1684e29 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 14 Feb 2019 18:07:08 +0530 Subject: [PATCH] fix annotation export for books without author --- static/js/exportAnnotationsDialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/exportAnnotationsDialog.js b/static/js/exportAnnotationsDialog.js index 6078e19..867c46d 100644 --- a/static/js/exportAnnotationsDialog.js +++ b/static/js/exportAnnotationsDialog.js @@ -45,7 +45,10 @@ oml.ui.exportAnnotationsDialog = function(data) { function getAnnotationsText() { var annotations = oml.$ui.viewer.getAnnotations() - var text = 'Annotations for ' + data.title + ' (' + data.author.join(', ') + ')\n\n\n\n' + var text = 'Annotations for ' + data.title + ( + data.author ?' (' + data.author.join(', ') + ')' + : '' + ) + '\n\n\n\n' text += annotations.map(function(annotation) { var page = annotation.pageLabel || annotation.page var text = 'Quote' + (page ? ' Page ' + page : '' )+ ':\n\n' + annotation.text