Delete createDnodeRemoteGetter.js (#8523)
parent
f5a125fe61
commit
6b5bbe50ee
@ -1,18 +0,0 @@ |
||||
export default createDnodeRemoteGetter |
||||
|
||||
function createDnodeRemoteGetter (dnode) { |
||||
let remote |
||||
|
||||
dnode.once('remote', (_remote) => { |
||||
remote = _remote |
||||
}) |
||||
|
||||
async function getRemote () { |
||||
if (remote) { |
||||
return remote |
||||
} |
||||
return await new Promise((resolve) => dnode.once('remote', resolve)) |
||||
} |
||||
|
||||
return getRemote |
||||
} |
Loading…
Reference in new issue