digitalbazaar / cborld

A Javascript CBOR-LD processor for web browsers and Node.js apps.
https://json-ld.github.io/cbor-ld-spec/
BSD 3-Clause "New" or "Revised" License
21 stars 17 forks source link

Second conditional will never be hit in context.js #13

Closed dlongley closed 3 years ago

dlongley commented 4 years ago

Since arrays are objects, the second conditional here will never be hit:

https://github.com/digitalbazaar/cborld/blob/499759e836cb573993aa77bea7854278b230cbcf/lib/context.js#L29-L31

The order needs to be swapped and better test coverage added.

dlongley commented 3 years ago

Fixed by PR #34.