Prevent variable from being reassigned in find method
This commit is contained in:
parent
072176dd39
commit
eaad87dd05
@ -35,7 +35,7 @@ exports.getIntentCommand = async (req, res) => {
|
|||||||
await redis.client.connect().catch(console.error)
|
await redis.client.connect().catch(console.error)
|
||||||
|
|
||||||
const intents = await Intent.findAll();
|
const intents = await Intent.findAll();
|
||||||
const intent = intents.find(intent => intent.description === text);
|
const intent = intents.find(obj => obj.description === text);
|
||||||
|
|
||||||
print(intent, config.DEVICE_ID);
|
print(intent, config.DEVICE_ID);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user