Skip to content

Commit f4d85e7

Browse files
committed
fix: ensure facsimile PDF file sizes are shown
1 parent 90f84fa commit f4d85e7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

modules/frus-html.xqm

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -841,12 +841,6 @@ function fh:mobi-size($node as node(), $model as map(*), $document-id as xs:stri
841841
fh:mobi-size($document-id)
842842
};
843843

844-
declare
845-
%templates:wrap
846-
function fh:pdf-size-templating($node as node(), $model as map(*), $document-id as xs:string) {
847-
fh:pdf-size($document-id)
848-
};
849-
850844
declare
851845
%templates:wrap
852846
function fh:pdf-size-templating($node as node(), $model as map(*), $document-id as xs:string, $section-id as xs:string?) {
@@ -859,7 +853,7 @@ declare function fh:mobi-url($document-id as xs:string) {
859853
};
860854

861855
declare function fh:pdf-url($document-id as xs:string, $section-id as xs:string?) {
862-
if ($section-id) then
856+
if (exists($section-id)) then
863857
doc($config:FRUS_COL_VOLUMES || "/" || $document-id || ".xml")//tei:relatedItem[@corresp eq "#" || $section-id and @type eq "pdf"]//tei:ref/@target
864858
else
865859
doc($config:FRUS_COL_VOLUMES || "/" || $document-id || ".xml")//tei:relatedItem[@corresp eq "#" || $document-id and @type eq "pdf"]//tei:ref/@target

0 commit comments

Comments
 (0)