Skip to content

Commit

Permalink
Merge pull request #44 from mschimk1/fix-source-maps-webpack5-istanbu…
Browse files Browse the repository at this point in the history
…l-loader

fix: Handling of rawSourceMap string type in webpack5-istanbul-loader
  • Loading branch information
yannbf authored Dec 24, 2024
2 parents 6fda448 + 7c17294 commit faaa24b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loader/webpack5-istanbul-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type RawSourceMap = {
};

function sanitizeSourceMap(rawSourceMap: RawSourceMap | string): RawSourceMap {
return rawSourceMap === "string" ? JSON.parse(rawSourceMap) : rawSourceMap;
return typeof rawSourceMap === "string" ? JSON.parse(rawSourceMap) : rawSourceMap;
}

export default function (
Expand Down

0 comments on commit faaa24b

Please sign in to comment.