diff --git a/js/components/WindowManager.js b/js/components/WindowManager.js index 5a3cf397..a31e5816 100644 --- a/js/components/WindowManager.js +++ b/js/components/WindowManager.js @@ -183,26 +183,19 @@ class WindowManager extends React.Component { left: 0 }; - const parentStyle = { - position: "absolute", - width: 0, - height: 0, - top: 0, - left: 0 - }; - return ( -
- {this.props.windowsInfo.map(w => ( -
this.handleMouseDown(w.key, e)} - style={{ ...style, transform: `translate(${w.x}px, ${w.y}px)` }} - key={w.key} - > - {this.props.windows[w.key]} -
- ))} -
+ const windows = this.props.windowsInfo.filter( + w => this.props.windows[w.key] ); + + return windows.map(w => ( +
this.handleMouseDown(w.key, e)} + style={{ ...style, transform: `translate(${w.x}px, ${w.y}px)` }} + > + {this.props.windows[w.key]} +
+ )); } }