removed doubled function ; return object instead of array with one element
This commit is contained in:
@@ -31,11 +31,10 @@ class App extends Component {
|
||||
};
|
||||
|
||||
getSkill(this.state._id).then(l=>l.json()).then(result=>{
|
||||
let jResult = result[0];
|
||||
if (jResult===undefined) return;
|
||||
this.setState({ skillID:jResult.skillID,skillName:jResult.skillName, invocationName: jResult.invocationName,
|
||||
invocationAnswer: jResult.invocationAnswer,
|
||||
allIntents: jResult.intents, contactEmail: jResult.contactEmail})
|
||||
if (result===undefined) return;
|
||||
this.setState({ skillID:result.skillID,skillName:result.skillName, invocationName: result.invocationName,
|
||||
invocationAnswer: result.invocationAnswer,
|
||||
allIntents: result.intents, contactEmail: result.contactEmail})
|
||||
})
|
||||
|
||||
this.handleIntentClick = this.handleIntentClick.bind(this);
|
||||
|
||||
Reference in New Issue
Block a user