misc bug fixes

pull/1133/head
gabrielburnworth 2019-03-20 13:14:47 -07:00
parent 2ecacecc99
commit af74e9ccb9
2 changed files with 4 additions and 4 deletions

View File

@ -192,8 +192,8 @@ export class EditFEForm extends React.Component<EditFEProps, State> {
return this.props.resources.sequenceMetas[this.executable.uuid];
}
get bodyVariables(): ParameterApplication[] | undefined {
return this.state.fe.body || this.props.farmEvent.body.body;
get bodyVariables(): ParameterApplication[] {
return this.state.fe.body || this.props.farmEvent.body.body || [];
}
overwriteStateFEBody = (newBody: ParameterApplication[]) => {
@ -214,7 +214,7 @@ export class EditFEForm extends React.Component<EditFEProps, State> {
variableData={this.variableData}
sequenceUuid={this.executable.uuid}
resources={this.props.resources}
onChange={this.editBodyVariables(this.bodyVariables || [])}
onChange={this.editBodyVariables(this.bodyVariables)}
allowedVariableNodes={AllowedVariableNodes.variable}
shouldDisplay={this.props.shouldDisplay} />

View File

@ -73,7 +73,7 @@ export async function fetchSyncData(dispatch: Function) {
1: () => Promise.all<{}>([
get("PlantTemplate", API.current.plantTemplatePath),
get("Peripheral", API.current.peripheralsPath),
get("Point", API.current.pointsPath),
get("Point", API.current.allPointsPath),
get("Sensor", API.current.sensorPath),
get("Tool", API.current.toolsPath)
]),