Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly handle missing algorithm type (#48)
Fixing a bug that happen in npm cli when I install a library. in Line 272 the result of parse can be null if integrity is null. Then in line 273 other is null so it breaks as below: ``` TypeError: Cannot read properties of null (reading 'pickAlgorithm') npm verb stack at Integrity.match (/usr/lib/node_modules/npm/node_modules/ssri/lib/index.js:273:24) npm verb stack at CachePolicy.satisfies (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/policy.js:112:49) npm verb stack at Function.find (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/entry.js:178:25) npm verb stack at async cacheFetch (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js:8:17) npm verb stack at async fetch (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:98:7) ```
- Loading branch information