Skip to content

Commit

Permalink
look up index in sorted files
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Sep 12, 2024
1 parent 610823f commit 5660b72
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const tokenCount = computed(() => {
* @param line Line to scroll to.
*/
function scrollTo(file: string, line: number) {
const fileIndex = Array.from(props.files).findIndex((f) => f.fileName === file)
const fileIndex = sortedFiles.value.findIndex((f) => f.fileName === file)
if (fileIndex !== -1) {
codePanels.value[fileIndex].expand()
nextTick(() => {
Expand Down

0 comments on commit 5660b72

Please sign in to comment.