mirror of https://github.com/embarklabs/embark.git
config should be stringified only once
This commit is contained in:
parent
b4e118c85b
commit
cc07f1d3d7
|
@ -75,15 +75,13 @@ class Whisper {
|
|||
let connection = this.communicationConfig.connection || {};
|
||||
|
||||
// todo: make the add code a function as well
|
||||
let config = JSON.stringify({
|
||||
let config = {
|
||||
server: canonicalHost(connection.host || defaultHost),
|
||||
port: connection.port || '8546',
|
||||
type: connection.type || 'ws'
|
||||
});
|
||||
};
|
||||
|
||||
config = JSON.stringify(config);
|
||||
|
||||
let code = "\nEmbarkJS.Messages.setProvider('whisper'," + config + ");";
|
||||
let code = `\nEmbarkJS.Messages.setProvider('whisper', ${JSON.stringify(config)});`;
|
||||
|
||||
let shouldInit = (communicationConfig) => {
|
||||
return (communicationConfig.provider === 'whisper' && communicationConfig.enabled === true);
|
||||
|
|
Loading…
Reference in New Issue