Skip to content

Commit 3e77252

Browse files
author
spoeck
committed
fix: undefined callbacks
1 parent fd27cdc commit 3e77252

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

index.ios.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11

22
import { NativeModules, NativeAppEventEmitter } from 'react-native';
33
import {ApiAiClient} from 'api-ai-javascript';
4-
//var SpeechToText = require('react-native-speech-to-text-ios');
5-
var SpeechToText = NativeModules.RNSpeechToTextIos;
6-
/*
7-
let ApiAi = NativeModules.ApiAi;
8-
9-
ApiAi.setConfiguration = (clientAccessToken, languageToken) => {
10-
ApiAi.client = new ApiAiJS.ApiAiClient({accessToken: clientAccessToken});
11-
}
124

5+
var SpeechToText = NativeModules.RNSpeechToTextIos;
136

14-
console.log(NativeModules);
15-
16-
module.exports = ApiAi;
17-
*/
187
class ApiAi {
198

209

@@ -47,7 +36,7 @@ class ApiAi {
4736
onError(result.error);
4837
} else {
4938
if (result.isFinal) {
50-
this.requestQuery(result.bestTranscription.formattedString, this.onResult, this.onError);
39+
this.requestQuery(result.bestTranscription.formattedString, onResult, onError);
5140
}
5241

5342
}

0 commit comments

Comments
 (0)