mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Use .name
instead of .code
for errors
Fix for the change in libp2p here: https://github.com/libp2p/js-libp2p/pull/2655
This commit is contained in:
parent
d290032ebf
commit
41f015cb13
@ -196,7 +196,7 @@ const Sync = async ({ ipfs, log, events, onSynced, start, timeout }) => {
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
peers.delete(peerId)
|
||||
if (e.code === 'ERR_UNSUPPORTED_PROTOCOL') {
|
||||
if (e.name === 'ERR_UNSUPPORTED_PROTOCOL') {
|
||||
// Skip peer, they don't have this database currently
|
||||
} else {
|
||||
events.emit('error', e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user