refactor(reference): simplify malformed UTF-8 handling
This commit is contained in:
1 parent
5a61562dc2
commit
377df715ea
1 file changed
+1
-4
@@ -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: [
|
||||
|
||||
Reference in new issue
Block a user