Skip to content

Commit

Permalink
refactor: use optional chaining for sourceMapCallback (#363)
Browse files Browse the repository at this point in the history
- following other optional chaining simplifications
  • Loading branch information
agilgur5 committed Jun 24, 2022
1 parent b9dce9d commit 4de17cf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ const typescript: PluginImpl<RPT2Options> = (options) =>

if (result.map)
{
if (pluginOptions.sourceMapCallback)
pluginOptions.sourceMapCallback(id, result.map);
pluginOptions.sourceMapCallback?.(id, result.map);
transformResult.map = JSON.parse(result.map);
}

Expand Down

0 comments on commit 4de17cf

Please sign in to comment.