Rename parseState to type
This commit is contained in:
parent
9dc14a3657
commit
52e825549d
4 changed files with 14 additions and 14 deletions
|
|
@ -87,7 +87,7 @@ class App extends React.Component<AppProps & Classes, AppState> {
|
|||
}
|
||||
for (let i in topics) {
|
||||
const topic = topics[i];
|
||||
const parseValue = this.topics[topic].parseState;
|
||||
const parseValue = this.topics[topic].type;
|
||||
const val = parseValue == null ? message.toString() : parseValue(message);
|
||||
this.setState({mqttState: merge(this.state.mqttState,
|
||||
{ [topic]: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue