Skip to content

Commit

Permalink
fix: handle missing source map
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 26, 2024
1 parent ce9b650 commit 1c2017d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release-please.yml
Expand Up @@ -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
Expand Down
16 changes: 9 additions & 7 deletions packages/istanbul-lib-source-maps/lib/map-store.js
Expand Up @@ -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);
}
}
});

Expand Down

0 comments on commit 1c2017d

Please sign in to comment.