Skip to content

Potential dead code in _handleChange #36

@jdalegonzalez

Description

@jdalegonzalez

In _handleChange, the following block appears:

_handleChange(e: Event) {

    ... // snip ...

    if (LinkedValueUtils.getValue(this) == null) {
        this.setState({currentValue: value});
    } else {
        this.setState({currentValue: value});
    }

    ... // snip ...

Since LinkedValueUtils.getValue has no side-effects, this appears to just be...

    //if (LinkedValueUtils.getValue(this) == null) {
    //    this.setState({currentValue: value});
    //} else {
          this.setState({currentValue: value});
    //}

Was this supposed to be...

    if (LinkedValueUtils.getValue(this) == null) {
        this.setState({currentValue: value});
    } else {
          this.setState({currentValue: LinkedValueUtils.getValue(this)});
    }

?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions