digitalbazaar / did-io

Decentralized identifier management library for browser and node.js
Other
43 stars 8 forks source link

Add conditional around `importKeys`. #14

Closed mattcollier closed 6 years ago

mattcollier commented 6 years ago

I found that if I'm doing a v1.get on a DID that was not generated by this library and is therefore not in storage that the call the this.keyStore.get on L45 returns null. null is not an acceptable value in the importKeys API which results in an uncaught error.

I don't know if this is the proper solution, but it is what I'm using as a workaround.