Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit 3c2096e

Browse files
authoredJan 21, 2021
fix: do not throw on empty provider list (#212)
If no content providers can be found, just be an empty iterator instead of throwing. This is necessary because multiple findProv strategies are tried higher up the stack, at which point we make the decision whether to throw or not. This makes the behaviour consistent with the delegated content routing module.
1 parent 5c39279 commit 3c2096e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed
 

‎src/content-routing/index.js

-4
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ module.exports = (dht) => {
148148
})
149149
})
150150

151-
if (out.length === 0) {
152-
throw errcode(new Error('no providers found'), 'ERR_NOT_FOUND')
153-
}
154-
155151
for (const pData of out.toArray()) {
156152
yield pData
157153
}

0 commit comments

Comments
 (0)
This repository has been archived.