From 3464a7f4361de7dfe4d92aad914f2bc23e0efc25 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Tue, 14 Nov 2023 21:52:26 +0000 Subject: [PATCH] fix: inputSourceMap can be null (#1639) * fix: inputSourceMap can be null * docs: Update CHANGELOG.md * chore: Update package.json --- CHANGELOG.md | 3 +++ package.json | 2 +- src/index.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf6748057..8f2f23014 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 9.5.1 +* [fix: inputSourceMap can be null](https://github.com/TypeStrong/ts-loader/pull/1639) [#1638] - thanks @johnnyreilly and @michaeltford + ## 9.5.0 * [Feature: map the input source map in case ts-loader is used in a loader pipeline](https://github.com/TypeStrong/ts-loader/pull/1626) - thanks @Ka0o0 and @bojanv55 diff --git a/package.json b/package.json index 6a5e3f9f9..9bb7deced 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-loader", - "version": "9.5.0", + "version": "9.5.1", "description": "TypeScript loader for webpack", "main": "index.js", "types": "dist", diff --git a/src/index.ts b/src/index.ts index ea950b779..c4c1b948c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -149,7 +149,7 @@ function makeSourceMapAndFinish( // in the first case, we simply return undefined. // in the second case we only need to return the newly generated source map // this avoids that we have to make a possibly expensive call to the source-map lib - if (sourceMap === undefined || inputSourceMap === undefined) { + if (sourceMap === undefined || !inputSourceMap) { callback(null, output, sourceMap); return; }