refactor(reference): simplify malformed UTF-8 handling

This commit is contained in:
morluto committed 2026-10-10 01:45:01 +08:00
1 parent 5a61562dc2
commit 377df715ea
1 file changed
+1 -4
+1 -4
View File
@@ -334,10 +334,7 @@ export const parseReferenceSourceImports = (
let source: string;
try {
source = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
} catch (cause: unknown) {
// The import still records the original bytes; lossy text cannot supply
// observed module names or relationships.
void cause;
} catch {
return {
relationships: [],
parse_failures: [