Open sompylasar opened 8 years ago
The issue is that Atellier's _handleSelectComponent method assumes there's always a component to select, but in case of handling the Workspace's onCloseProperties it's null.
Atellier
_handleSelectComponent
component
Workspace
onCloseProperties
null
https://github.com/scup/atellier/blob/5ad6a401d78b5625eb5293891b4741aad0149788/src/Atellier.js#L39
_handleSelectComponent = (component, key) => { component.indexKey = key; this.setState({stagedComponent: component}); };
https://github.com/scup/atellier/blob/5ad6a401d78b5625eb5293891b4741aad0149788/src/Atellier.js#L34
<Workspace components={components} component={stagedComponent} onCloseProperties={this._handleSelectComponent} />
https://github.com/scup/atellier/blob/5ad6a401d78b5625eb5293891b4741aad0149788/src/PropertiesContainer.js#L147
_handleCloseProperties = () => { return this.props.onCloseProperties && this.props.onCloseProperties(null); };
The issue is that
Atellier
's_handleSelectComponent
method assumes there's always acomponent
to select, but in case of handling theWorkspace
'sonCloseProperties
it'snull
.https://github.com/scup/atellier/blob/5ad6a401d78b5625eb5293891b4741aad0149788/src/Atellier.js#L39
https://github.com/scup/atellier/blob/5ad6a401d78b5625eb5293891b4741aad0149788/src/Atellier.js#L34
https://github.com/scup/atellier/blob/5ad6a401d78b5625eb5293891b4741aad0149788/src/PropertiesContainer.js#L147