Fixed unused param + simplification

This commit is contained in:
rand00 2022-06-26 18:26:40 +02:00 committed by Reynir Björnsson
parent ffc062727a
commit f3d8eea546
2 changed files with 3 additions and 5 deletions

View file

@ -673,13 +673,11 @@ let error_template error _debug_info suggested_response =
| None -> "?"
| Some req -> Dream.target req in
let referer =
error.Dream.request
|> Option.map (fun req -> Dream.header req "referer")
|> Option.value ~default:None
Option.bind error.Dream.request (fun req -> Dream.header req "referer")
in
let html =
if is_iframe_page ~req:error.Dream.request then
Views.viz_not_found ~target
Views.viz_not_found
else
Views.page_not_found ~target ~referer
in

View file

@ -235,7 +235,7 @@ let page_not_found ~target ~referer =
)
|> layout ~title:"Page not found"
let viz_not_found ~target =
let viz_not_found =
let title = "Visualization not found" in
let content =
[