fix(variable): checking values for nil when using mirror (#144)

This commit is contained in:
Ilya Puchka
2017-10-02 10:38:50 +02:00
committed by Kyle Fuller
parent 46f179e3ed
commit e7a0738bda
3 changed files with 22 additions and 0 deletions

View File

@@ -105,6 +105,10 @@ public struct Variable : Equatable, Resolvable {
if current == nil {
return nil
// mirror returns non-nil value even for nil-containing properties
// so we have to check if its value is actually nil or not
} else if let current = current, String(describing: current) == "nil" {
return nil
}
} else {
return nil