diff --git a/web/app/views/tags/result_field.scala.html b/web/app/views/tags/result_field.scala.html index c36bbf058..a8c899a2c 100644 --- a/web/app/views/tags/result_field.scala.html +++ b/web/app/views/tags/result_field.scala.html @@ -6,9 +6,10 @@ @import java.util.Optional @import controllers.resources.Lobid -@jsonVal(p: String) = @{ node match { - case Some(node) => node - case None => if ((doc \\ p).isEmpty) (doc \ p) else (doc \\ p).head +@jsonVal(p: String) = @{ + node match { + case Some(node) => (node \ p).asOpt[JsValue].getOrElse(node \ p) + case None => if ((doc \\ p).isEmpty) (doc \ p) else (doc \\ p).head } }