mirror of https://github.com/SnapKit/SnapKit
Added explicit nil check in LayoutConstraint
This commit is contained in:
parent
7cf2e05461
commit
6e68c3ae5c
|
@ -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 []
|
||||||
|
|
Loading…
Reference in New Issue