From 955a43a14dfb232701650c95ebf5094c6fc9709c Mon Sep 17 00:00:00 2001 From: Vojta Bartos Date: Fri, 5 Jun 2015 10:11:04 +0200 Subject: [PATCH] Fix bug where we want to set custom shell - at container details sub header - tried to access to array like object - added reduce function to make array object --- src/components/ContainerDetailsSubheader.react.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/ContainerDetailsSubheader.react.js b/src/components/ContainerDetailsSubheader.react.js index bc9d4a348d..c34ccd6de8 100644 --- a/src/components/ContainerDetailsSubheader.react.js +++ b/src/components/ContainerDetailsSubheader.react.js @@ -102,7 +102,11 @@ var ContainerDetailsSubheader = React.createClass({ if (!this.disableTerminal()) { metrics.track('Terminaled Into Container'); var container = this.props.container; - var shell = ContainerUtil.env(container).SHELL; + var shell = ContainerUtil.env(container).reduce((envs, env) => { + envs[env[0]] = env[1]; + return envs; + }, {}).SHELL; + if(typeof shell === 'undefined') { shell = 'sh'; }