You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a check for typeof string, then a check for sri.algorithm && ..., then an else condition.
I suggest checking if sri is an object before trying to access a property on it.
I understand that exhaustive type-checking of arguments adds noise, but in this case the function is doing some type checking already so it might make sense to be more explicit.
We had an issue over at pnpm where we didn't pass in the sri by accident. pnpm/pnpm#1324
The text was updated successfully, but these errors were encountered:
https://github.com/zkat/ssri/blob/latest/index.js#L121-L133
There is a check for
typeof string
, then a check forsri.algorithm && ...
, then anelse
condition.I suggest checking if
sri
is an object before trying to access a property on it.I understand that exhaustive type-checking of arguments adds noise, but in this case the function is doing some type checking already so it might make sense to be more explicit.
We had an issue over at pnpm where we didn't pass in the
sri
by accident. pnpm/pnpm#1324The text was updated successfully, but these errors were encountered: