From 1c2017d5a3e20ef5725b77a8e4d76eff84b9a62f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 26 Feb 2024 21:55:21 +0100 Subject: [PATCH] fix: handle missing source map --- .github/workflows/release-please.yml | 1 + .../istanbul-lib-source-maps/lib/map-store.js | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 213b356c..4a2d1aba 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -8,6 +8,7 @@ jobs: runs-on: ubuntu-latest outputs: paths_released: ${{ steps.manifest_release.outputs.paths_released }} + releases_created: ${{ steps.manifest_release.outputs.releases_created }} steps: - uses: google-github-actions/release-please-action@v4 id: manifest_release diff --git a/packages/istanbul-lib-source-maps/lib/map-store.js b/packages/istanbul-lib-source-maps/lib/map-store.js index 22c789a7..31fd986e 100644 --- a/packages/istanbul-lib-source-maps/lib/map-store.js +++ b/packages/istanbul-lib-source-maps/lib/map-store.js @@ -192,13 +192,15 @@ class MapStore { const smc = new TraceMap(obj); smc.sources.forEach(s => { - const content = sourceContentFor(smc, s); - if (content) { - const sourceFilePath = pathutils.relativeTo( - s, - filePath - ); - this.sourceStore.set(sourceFilePath, content); + if (s) { + const content = sourceContentFor(smc, s); + if (content) { + const sourceFilePath = pathutils.relativeTo( + s, + filePath + ); + this.sourceStore.set(sourceFilePath, content); + } } });