Skip to content

Commit

Permalink
fix: try getting font index which is hit by comemo (#1213)
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin authored Jan 27, 2025
1 parent 5ee0e4e commit 86d3b91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/tinymist-project/src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl FontResolver for TinymistFontResolver {
}

fn font(&self, idx: usize) -> Option<Font> {
self.fonts[idx].get_or_init()
self.fonts.get(idx)?.get_or_init()
}

fn get_by_info(&self, info: &FontInfo) -> Option<Font> {
Expand Down

0 comments on commit 86d3b91

Please sign in to comment.