Skip to content

Commit 7396d50

Browse files
committed
fix: NPE in detail view
Only exist v7.0.0-SNAPSHOT is affected see eXist-db/exist#5707
1 parent 8ea5db5 commit 7396d50

File tree

1 file changed

+5
-1
lines changed
  • src/main/xar-resources/modules

1 file changed

+5
-1
lines changed

src/main/xar-resources/modules/app.xql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@ function app:view(
365365
) {
366366
let $modules :=
367367
if ($location) then
368-
$app:data[xqdoc:module/xqdoc:uri eq $uri][xqdoc:control/xqdoc:location eq $location]
368+
(: We need to re-read the collection here to avoid an NPE in exist-7.0.0-SNAPSHOT
369+
see https://github.com/eXist-db/exist/issues/5707 :)
370+
collection($config:app-data)/xqdoc:xqdoc
371+
[xqdoc:module/xqdoc:uri eq $uri]
372+
[xqdoc:control/xqdoc:location eq $location]
369373
else
370374
$app:data[xqdoc:module/xqdoc:uri eq $uri]
371375

0 commit comments

Comments
 (0)