remove unnecessary concatenation

This commit is contained in:
Iuri Matias 2017-02-23 19:49:48 -05:00
parent 0db2b663ad
commit 550b81c9b2

View File

@ -82,7 +82,7 @@ ABIGenerator.prototype.generateStorageInitialization = function(useEmbarkJS) {
if (!useEmbarkJS || self.storageConfig === {}) return "";
if (self.storageConfig.provider === 'ipfs' && self.storageConfig.enabled === true) {
result += "\n" + "EmbarkJS.Storage.setProvider('" + self.storageConfig.provider + "', {server: '" + self.storageConfig.host + "', port: '" + self.storageConfig.port + "'});";
result += "\nEmbarkJS.Storage.setProvider('" + self.storageConfig.provider + "', {server: '" + self.storageConfig.host + "', port: '" + self.storageConfig.port + "'});";
}
return result;
@ -95,9 +95,9 @@ ABIGenerator.prototype.generateCommunicationInitialization = function(useEmbarkJ
if (!useEmbarkJS || self.communicationConfig === {}) return "";
if (self.communicationConfig.provider === 'ipfs' && self.communicationConfig.enabled === true) {
result += "\n" + "EmbarkJS.Storage.setProvider('" + self.communicationConfig.provider + "');";
result += "\nEmbarkJS.Storage.setProvider('" + self.communicationConfig.provider + "');";
} else if (self.communicationConfig.provider === 'orbit' && self.communicationConfig.enabled === true) {
result += "\n" + "EmbarkJS.Storage.setProvider('" + self.communicationConfig.provider + "', {server: '" + self.communicationConfig.host + "', port: '" + self.communicationConfig.port + "'});";
result += "\nEmbarkJS.Storage.setProvider('" + self.communicationConfig.provider + "', {server: '" + self.communicationConfig.host + "', port: '" + self.communicationConfig.port + "'});";
}
return result;