Skip to content

Commit

Permalink
Merge pull request #262 from iambumblehead/pnp-resolver-fix
Browse files Browse the repository at this point in the history
catch exceptions generated by pnpapi
  • Loading branch information
iambumblehead authored Oct 23, 2023
2 parents b95a699 + f1135fb commit 58f3b6d
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 { /* empty */ }

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

0 comments on commit 58f3b6d

Please sign in to comment.