Skip to content

Commit

Permalink
changed order of condition to make positive case first
Browse files Browse the repository at this point in the history
  • Loading branch information
art-divin authored Aug 26, 2023
1 parent 973609e commit 6b6d6c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Stencil/Variable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ public struct Variable: Equatable, Resolvable {
} else if let value = context as? DynamicMemberLookup {
return value[dynamicMember: bit]
} else if let object = context as? NSObject { // NSKeyValueCoding
#if !canImport(ObjectiveC)
return nil
#else
#if canImport(ObjectiveC)
if object.responds(to: Selector(bit)) {
return object.value(forKey: bit)
}
#else
return nil
#endif
} else if let value = context {
return Mirror(reflecting: value).getValue(for: bit)
Expand Down

0 comments on commit 6b6d6c2

Please sign in to comment.