LMCoreNS // Disable forced unwrap.

This commit is contained in:
ShikiSuen 2022-05-31 22:50:16 +08:00
parent 4d010e9fc7
commit d0fba52ca8
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,8 @@ extension vChewing {
do {
let rawData = try Data(contentsOf: URL(fileURLWithPath: path))
let rawPlist = try PropertyListSerialization.propertyList(from: rawData, format: nil) as! [String: [Data]]
let rawPlist: [String: [Data]] =
try PropertyListSerialization.propertyList(from: rawData, format: nil) as? [String: [Data]] ?? .init()
rangeMap = rawPlist
} catch {
IME.prtDebugIntel("↑ Exception happened when reading plist file at: \(path).")