From b120cce32ef9236e85e1bdfa57a3a6a45e99b351 Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Sat, 18 May 2024 08:55:21 -0400 Subject: [PATCH] fix(document-symbols): ensure its spec compliant (#489) --- lib/next_ls/document_symbol.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/next_ls/document_symbol.ex b/lib/next_ls/document_symbol.ex index 7a283f69..40e0f097 100644 --- a/lib/next_ls/document_symbol.ex +++ b/lib/next_ls/document_symbol.ex @@ -33,7 +33,9 @@ defmodule NextLS.DocumentSymbol do ast end - List.wrap(walker(ast, nil)) + for %DocumentSymbol{} = ds <- List.wrap(walker(ast, nil)) do + ds + end end defp walker([{{:__literal__, _, [:do]}, {_, _, _exprs} = ast}], mod) do