From 4de17cf9879355cce5104f66a46127ede69696d1 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Fri, 24 Jun 2022 12:23:28 -0400 Subject: [PATCH] refactor: use optional chaining for `sourceMapCallback` (#363) - following other optional chaining simplifications --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 58381c1..40e4080 100644 --- a/src/index.ts +++ b/src/index.ts @@ -251,8 +251,7 @@ const typescript: PluginImpl = (options) => if (result.map) { - if (pluginOptions.sourceMapCallback) - pluginOptions.sourceMapCallback(id, result.map); + pluginOptions.sourceMapCallback?.(id, result.map); transformResult.map = JSON.parse(result.map); }