Skip to content

Commit f753b1c

Browse files
authored
Merge pull request #1851 from SafelySwift/patch-1
Update NSKeyedArchiver.swift
2 parents 3fcfcd6 + 1de23cf commit f753b1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Foundation/NSKeyedArchiver.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,11 +410,11 @@ open class NSKeyedArchiver : NSCoder {
410410
let encodingContext = self._containers.last!
411411
var encodingKey : String
412412

413-
if key != nil {
413+
if let key = key {
414414
if escape {
415-
encodingKey = escapeArchiverKey(key!)
415+
encodingKey = escapeArchiverKey(key)
416416
} else {
417-
encodingKey = key!
417+
encodingKey = key
418418
}
419419
} else {
420420
encodingKey = _nextGenericKey()

0 commit comments

Comments
 (0)