Skip to content

Commit 37f9df9

Browse files
committed
fix: missing AST from first file
1 parent 126e05a commit 37f9df9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Nitra/Nitra.Runtime/ProjectSystem/Project.n

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,13 @@ namespace Nitra.ProjectSystem
115115

116116
when (files.Length == 0)
117117
return null;
118-
119-
match (files[0].Ast)
118+
119+
def fileWithAst = files.FirstOrDefault(f => f.Ast != null);
120+
121+
when (fileWithAst == null)
122+
return null;
123+
124+
match (fileWithAst.Ast)
120125
{
121126
| x is IProjectSupport => x
122127
| x =>

0 commit comments

Comments
 (0)