Skip to content

Commit

Permalink
catch exceptions generated by pnpapi
Browse files Browse the repository at this point in the history
  • Loading branch information
koshic committed Oct 23, 2023
1 parent b95a699 commit a9b85ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pnpResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export default pnpapi && ((id, parent) => {
return null
}

const path = pnpapi.resolveRequest(id, parent)
let path = null
try {
path = pnpapi.resolveRequest(id, parent)
} catch {}

Check failure on line 18 in src/pnpResolver.js

View workflow job for this annotation

GitHub Actions / build

Empty block statement

return path !== null ? pathToFileURL(path).href : null
})

0 comments on commit a9b85ba

Please sign in to comment.