perf(packages/codegen): remove redundant branch (#25885)

Follow-on after #25585. Small optimization.

The function exits early if `sourceText === undefined`, so no need to check this again later.
This commit is contained in:
overlookmotel committed 2026-08-18 17:25:18 +00:00
1 parent be6adf0d51
commit b6b14c0629
1 file changed
+2 -3
+2 -3
View File
@@ -264,14 +264,13 @@ export function generateSourceMap(state: State, options: Options): SourceMap {
previousOriginalColumn = originalColumn;
}
const map: SourceMap = {
return {
version: 3,
mappings: mappingBuffer.toString("ascii", 0, mappingLength),
names,
sources: [options.sourceFilename ?? ""],
sourcesContent: [sourceText],
};
if (sourceText !== undefined) map.sourcesContent = [sourceText];
return map;
}
/**