Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hooks/use-ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function useAST() {
});
astParseResult = { ast, ok: true };
} catch (err) {
// error occured e.g. because the JS code cannot be parsed into an AST, or the esquery selector is no valid selector --> just ignore (no highlighted ranges)
// error occurred e.g. because the JS code cannot be parsed into an AST, or the esquery selector is no valid selector --> just ignore (no highlighted ranges)
astParseResult = { ok: false, errors: [err as FileError] };
}
break;
Expand Down Expand Up @@ -140,7 +140,7 @@ function getEsqueryMatchedNodes(ast: unknown, esquerySelector: string) {
) as unknown[];
return esqueryMatchedNodes;
} catch {
// error occured e.g. because the esquery selector is no valid selector --> just ignore (no nodes matched --> no highlighted ranges)
// error occurred e.g. because the esquery selector is no valid selector --> just ignore (no nodes matched --> no highlighted ranges)
}
}
return [];
Expand Down