ctlIME // Add guard-let to client() in clientBundleIdentifier().

This commit is contained in:
ShikiSuen 2022-08-19 22:22:14 +08:00
parent beb4d52503
commit 0d6a5f4a8d
1 changed files with 4 additions and 1 deletions

View File

@ -13,7 +13,10 @@ import Cocoa
// MARK: - KeyHandler Delegate // MARK: - KeyHandler Delegate
extension ctlInputMethod: KeyHandlerDelegate { extension ctlInputMethod: KeyHandlerDelegate {
var clientBundleIdentifier: String { client()?.bundleIdentifier() ?? "" } var clientBundleIdentifier: String {
guard let client = client() else { return "" }
return client.bundleIdentifier() ?? ""
}
func ctlCandidate() -> ctlCandidateProtocol { ctlInputMethod.ctlCandidateCurrent } func ctlCandidate() -> ctlCandidateProtocol { ctlInputMethod.ctlCandidateCurrent }