Skip to content

Commit caa9d26

Browse files
committed
avoid replaceAll and use replace+global regexp instead, not supported in node<15
1 parent e3de4b9 commit caa9d26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mesh/agents/discovery/ObjectDiscoveryAgent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ObjectDiscoveryAgent implements Agent {
3030
static newestReplyFirst = (a: ObjectDiscoveryReply, b: ObjectDiscoveryReply) => (b.timestamp - a.timestamp);
3131

3232
private static makeEndpointObjectPair(hash: Hash, source: Endpoint, destination: Endpoint) {
33-
return hash + '_' + source.replaceAll('_', '__') + '_' + destination.replaceAll('_', '__');
33+
return hash + '_' + source.replace(/_/g, '__') + '_' + destination.replace(/_/g, '__');
3434
}
3535

3636
pod?: AgentPod;

0 commit comments

Comments
 (0)