Skip to content

Commit ec2a86e

Browse files
committed
Fixes a bug causing faulty equality check
1 parent fcc0c5b commit ec2a86e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Sources/MSCognitiveServices/MSTTS/MSTTS.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ public class MSTTS: TTSService, MSSpeechSynthesizerDelegate, ObservableObject {
6565
/// Updates the voices if config changes. Will remove voices if new value is nil
6666
public var config:Config? {
6767
set {
68+
var old = synthesizer.config
6869
synthesizer.config = newValue
6970
if newValue == nil {
7071
voices = .init()
71-
} else if newValue != config {
72+
} else if newValue != old {
7273
updateVoices()
7374
}
7475
updateAvailable()

0 commit comments

Comments
 (0)