forked from Mirrors/doipjs
Handle claims without matches
This commit is contained in:
parent
0e6c0574b9
commit
12df5b3fc3
1 changed files with 10 additions and 0 deletions
10
src/claim.js
10
src/claim.js
|
@ -209,6 +209,16 @@ class Claim {
|
|||
// Handle options
|
||||
opts = mergeOptions(defaults.opts, opts ? opts : {})
|
||||
|
||||
// If there are no matches
|
||||
if (this._matches.length === 0) {
|
||||
this._verification = {
|
||||
result: false,
|
||||
completed: true,
|
||||
proof: {},
|
||||
errors: ['No matches for claim'],
|
||||
}
|
||||
}
|
||||
|
||||
// For each match
|
||||
for (let index = 0; index < this._matches.length; index++) {
|
||||
const claimData = this._matches[index]
|
||||
|
|
Loading…
Reference in a new issue