digitalbazaar / jsonld-signatures

An implementation of the Linked Data Signatures specification for JSON-LD. Works in the browser and Node.js.
BSD 3-Clause "New" or "Revised" License
138 stars 41 forks source link

Method `length` called on a Map #150

Closed aljones15 closed 3 years ago

aljones15 commented 3 years ago

Looks like when some of these _verify methods were revised to use Map from Array not all of the methods were updated:

https://github.com/digitalbazaar/jsonld-signatures/blob/10871df6e91421b20ddfae065baf688e7acdbfdc/lib/ProofSet.js#L201-L216

This code will consistently evaluate to

undefined < purposes.length
// false

which will be false in almost all cases.

aljones15 commented 3 years ago

closing as issue has been resolved.