Skip to content

Commit de10130

Browse files
committed
Make doc an empty string if missing
1 parent b0f25f6 commit de10130

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/hexdocs/search/typesense.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ defmodule Hexdocs.Search.Typesense do
1313
Enum.map(search_items, fn item ->
1414
json =
1515
Map.take(item, ["type", "ref", "title", "doc"])
16+
|> Map.update("doc", "", fn
17+
nil -> ""
18+
doc -> doc
19+
end)
1620
|> Map.put("package", full_package)
1721
|> Map.put("proglang", proglang)
1822
|> JSON.encode!()

0 commit comments

Comments
 (0)