Skip to content

Closing the props pane triggers "Uncaught TypeError: Cannot set property 'indexKey' of null" #47

@sompylasar

Description

@sompylasar

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.

_handleSelectComponent = (component, key) => {

  _handleSelectComponent = (component, key) => {
    component.indexKey = key;
    this.setState({stagedComponent: component});
  };

<Workspace components={components} component={stagedComponent} onCloseProperties={this._handleSelectComponent} />

<Workspace components={components} component={stagedComponent} onCloseProperties={this._handleSelectComponent} />

return this.props.onCloseProperties && this.props.onCloseProperties(null);

  _handleCloseProperties = () => {
    return this.props.onCloseProperties && this.props.onCloseProperties(null);
  };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions