diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index 2e2dc926..ad7fc055 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -112,7 +112,7 @@ class ctlInputMethod: IMKInputController { } override func setValue(_ value: Any!, forTag _: Int, client: Any!) { - var newInputMode = InputMode(rawValue: value as? String ?? InputMode.imeModeNULL.rawValue) + var newInputMode: InputMode = InputMode(rawValue: value as? String ?? "") ?? InputMode.imeModeNULL switch newInputMode { case InputMode.imeModeCHS: newInputMode = InputMode.imeModeCHS