From fd5eca6856c0f34be4f89e66b5c1702690f06cad Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 16 Jul 2017 13:38:12 -0400 Subject: [PATCH] replace all instances of matched lib --- lib/contracts/deploy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/contracts/deploy.js b/lib/contracts/deploy.js index e3103da2..8af0a170 100644 --- a/lib/contracts/deploy.js +++ b/lib/contracts/deploy.js @@ -115,7 +115,7 @@ class Deploy { } let linkReference = '__' + filename + ":" + contractObj.className; let toReplace = linkReference + "_".repeat(40 - linkReference.length); - contractCode = contractCode.replace(toReplace, deployedAddress); + contractCode = contractCode.replace(new RegExp(toReplace, "g"), deployedAddress); } // TODO: probably needs to be defaultAccount