mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
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
|
// Handle options
|
||||||
opts = mergeOptions(defaults.opts, opts ? opts : {})
|
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 each match
|
||||||
for (let index = 0; index < this._matches.length; index++) {
|
for (let index = 0; index < this._matches.length; index++) {
|
||||||
const claimData = this._matches[index]
|
const claimData = this._matches[index]
|
||||||
|
|
Loading…
Reference in a new issue