double negation instead of ternary. force boolean
This commit is contained in:
parent
b7722ed333
commit
c720df0805
1 changed files with 2 additions and 2 deletions
|
@ -22,13 +22,13 @@ export default function getDockerArguments(server) {
|
|||
|
||||
if (servers[server]) {
|
||||
if (servers[server].socket) {
|
||||
return { conn: { socketPath: servers[server].socket }, swarm: servers[server].swarm == true ? true : false };
|
||||
return { conn: { socketPath: servers[server].socket }, swarm: !!servers[server].swarm };
|
||||
}
|
||||
|
||||
if (servers[server].host) {
|
||||
return {
|
||||
conn: { host: servers[server].host, port: servers[server].port || null },
|
||||
swarm: servers[server].swarm == true ? true : false,
|
||||
swarm: !!servers[server].swarm,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue