Skip to content
Snippets Groups Projects
Commit ce4c0d4c authored by Peter Stadler's avatar Peter Stadler Committed by Daniel Jettka
Browse files

ensure to return a string

when $eventualTitles is the empty sequence.
parent 6ce89862
No related branches found
No related tags found
No related merge requests found
...@@ -206,8 +206,8 @@ declare function local:getWindowTitle($doc as document-node()?, $type as xs:stri ...@@ -206,8 +206,8 @@ declare function local:getWindowTitle($doc as document-node()?, $type as xs:stri
for $t in $doc//*:title return for $t in $doc//*:title return
$t => normalize-space() $t => normalize-space()
) )
(: ensure to return a string when $eventualTitles is the empty sequence :)
return $eventualTitles[1] return $eventualTitles[1] => string()
else else
('[No title found!]') ('[No title found!]')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment