Skip to content

Commit

Permalink
Fix module indexing error
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Ming authored and Scott Ming committed Nov 17, 2023
1 parent 3945da3 commit 94a5ee3
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ defmodule Lexical.RemoteControl.Search.Indexer.SourceTest do
doc = Document.new("file:///#{path}", source, 1)

case Indexer.Source.index("/foo/bar/baz.ex", source) do
{:ok, indexed_items} -> {:ok, indexed_items, doc}
error -> error
{:ok, indexed_items} ->
items = Enum.filter(indexed_items, &(&1.type == :module))
{:ok, items, doc}

error ->
error
end
end

Expand Down

0 comments on commit 94a5ee3

Please sign in to comment.