Skip to content

Commit

Permalink
fix(nlu): fix "isLoaded of undefined" on model load
Browse files Browse the repository at this point in the history
  • Loading branch information
slvnperron committed Oct 4, 2019
1 parent 0cb19a6 commit 082c6ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/nlu/src/backend/engine.ts
Expand Up @@ -470,7 +470,8 @@ export default class ScopedEngine implements Engine {
}

const allIntents = (await this.getIntents()) || []
const shouldPredict = allIntents.length && this.intentClassifiers[ds.language].isLoaded
const shouldPredict =
allIntents.length && this.intentClassifiers[ds.language] && this.intentClassifiers[ds.language].isLoaded

if (!shouldPredict) {
return ds
Expand Down

0 comments on commit 082c6ad

Please sign in to comment.