mirror of
https://github.com/ezolenko/rollup-plugin-typescript2.git
synced 2025-12-08 19:06:16 +00:00
refactor: use optional chaining for sourceMapCallback (#363)
- following other optional chaining simplifications
This commit is contained in:
parent
b9dce9dfd1
commit
4de17cf987
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user