Fix click to add for flux functions

pull/4750/head
Iris Scholten 2018-11-06 12:44:29 -08:00
parent 335248c0fd
commit 75afa76c88
1 changed files with 5 additions and 1 deletions

View File

@ -51,9 +51,13 @@ class FluxScriptEditor extends PureComponent<Props, State> {
}
}
public componentDidUpdate(prevProps) {
public componentDidUpdate(prevProps: Props) {
const {status, visibility} = this.props
if (prevProps.script !== this.props.script) {
this.setState({script: this.props.script})
}
if (status.type === 'error') {
this.makeError()
}