diff --git a/CHANGELOG.md b/CHANGELOG.md index f96b535a..da6d1f4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # @digitalcredentials/vc ChangeLog +## 4.1.1 - 2022-07-06 + +### Fixed +- Remove use of `URL.protocol` (not implemented in React Native). + ## 4.1.0 - 2022-07-06 ### Added diff --git a/lib/index.js b/lib/index.js index 73f554f7..9329c417 100644 --- a/lib/index.js +++ b/lib/index.js @@ -681,16 +681,11 @@ function _checkCredential({credential, log = [], now = new Date()}) { } function _validateUriId({id, propertyName}) { - let parsed; try { - parsed = new URL(id); + new URL(id); } catch(e) { const error = new TypeError(`"${propertyName}" must be a URI: "${id}".`); error.cause = e; throw error; } - - if(!parsed.protocol) { - throw new TypeError(`"${propertyName}" must be a URI: "${id}".`); - } }