fix import issue

This commit is contained in:
Pavel Murygin 2021-04-09 14:12:44 +03:00
parent d9224d5409
commit 9340ec9d98

View File

@ -240,8 +240,7 @@ module.exports = Connection
* @param {{ direction: any; timeline: any; multiplexer?: string | undefined; encryption?: string | undefined; }} stat
*/
function validateArgs (localAddr, localPeer, remotePeer, newStream, close, getStreams, stat) {
// @ts-ignore
if (localAddr && !multiaddr.isMultiaddr(localAddr)) {
if (localAddr && !multiaddr.Multiaddr.isMultiaddr(localAddr)) {
throw errCode(new Error('localAddr must be an instance of multiaddr'), 'ERR_INVALID_PARAMETERS')
}