From 54ca041fcbe4d4338e7a034d8e894aa0123cfdf9 Mon Sep 17 00:00:00 2001 From: Wolfgang Meier Date: Fri, 11 Oct 2024 10:05:31 +0000 Subject: [PATCH] Fix error if $request?parameters is not set --- modules/lib/util.xql | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/lib/util.xql b/modules/lib/util.xql index 843e7285..6c469bf6 100644 --- a/modules/lib/util.xql +++ b/modules/lib/util.xql @@ -86,9 +86,12 @@ declare function tpu:parse-pi($doc as document-node(), $view as xs:string?, $odd }; declare function tpu:get-template-config($request as map(*)) { - for $param in map:keys($request?parameters) - return - request:set-attribute($param, $request?parameters($param)), + if (map:contains($request, "parameters")) then + for $param in map:keys($request?parameters) + return + request:set-attribute($param, $request?parameters($param)) + else + (), map:merge(( $tpu:template-config, map {