From 2615820e6bf463783fb3785cb3e5a77239cb682c Mon Sep 17 00:00:00 2001 From: Volker Andres Date: Mon, 30 Sep 2019 21:02:10 +0200 Subject: [PATCH] fix: reinitializing of variables under iOS --- src/ios/CDVTTS.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ios/CDVTTS.m b/src/ios/CDVTTS.m index d82e134..755ff2c 100644 --- a/src/ios/CDVTTS.m +++ b/src/ios/CDVTTS.m @@ -61,11 +61,11 @@ - (void)speak:(CDVInvokedUrlCommand*)command { [synthesizer stopSpeakingAtBoundary:AVSpeechBoundaryImmediate]; - NSDictionary* options = [command.arguments objectAtIndex:0]; + options = [command.arguments objectAtIndex:0]; - NSString* text = [options objectForKey:@"text"]; - NSString* locale = [options objectForKey:@"locale"]; - double rate = [[options objectForKey:@"rate"] doubleValue]; + text = [options objectForKey:@"text"]; + locale = [options objectForKey:@"locale"]; + rate = [[options objectForKey:@"rate"] doubleValue]; double pitch = [[options objectForKey:@"pitch"] doubleValue]; if (!locale || (id)locale == [NSNull null]) {