Added explicit nil check in LayoutConstraint

This commit is contained in:
Robert Payne 2014-08-05 13:20:54 +12:00
parent 7cf2e05461
commit 6e68c3ae5c
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class LayoutConstraint: NSLayoutConstraint {
internal class func layoutConstraintsInstalledOnView(view: View) -> Array<LayoutConstraint> { internal class func layoutConstraintsInstalledOnView(view: View) -> Array<LayoutConstraint> {
var constraints = objc_getAssociatedObject(view, &layoutConstraintsInstalledOnViewKey) as? Array<LayoutConstraint> var constraints = objc_getAssociatedObject(view, &layoutConstraintsInstalledOnViewKey) as? Array<LayoutConstraint>
if constraints { if constraints != nil {
return constraints! return constraints!
} }
return [] return []