don't crash on empty file

This commit is contained in:
Mylloon 2024-11-20 01:02:48 +01:00
parent b7fb63afc2
commit aaccfb8d0e
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -159,5 +159,5 @@ pub fn get<'a>(root: &'a AstNode<'a>, mtype: MType) -> MFile {
}, },
}) })
.next() .next()
.unwrap() .unwrap_or_default()
} }