diff --git a/pool/web/view/layout/layout.ml b/pool/web/view/layout/layout.ml index 1ba597d9b..974ec3db1 100644 --- a/pool/web/view/layout/layout.ml +++ b/pool/web/view/layout/layout.ml @@ -87,9 +87,8 @@ module Tenant = struct let%lwt head_script, body_script = let open Settings.PageScript in let%lwt page_scripts = find database_label in - let make_script = function - | None -> [] - | Some s -> [ script (Unsafe.data (value s)) ] + let make_script = + CCOption.map_or ~default:[] (value %> Unsafe.data %> script %> CCList.return) in let head = make_script page_scripts.head in let body = make_script page_scripts.body in