From 6e68c3ae5c0ae28a092e8c5570c47ffcaed4e356 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Tue, 5 Aug 2014 13:20:54 +1200 Subject: [PATCH] Added explicit nil check in LayoutConstraint --- Snappy/LayoutConstraint.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Snappy/LayoutConstraint.swift b/Snappy/LayoutConstraint.swift index 43c7f80..5ccb212 100644 --- a/Snappy/LayoutConstraint.swift +++ b/Snappy/LayoutConstraint.swift @@ -39,7 +39,7 @@ class LayoutConstraint: NSLayoutConstraint { internal class func layoutConstraintsInstalledOnView(view: View) -> Array { var constraints = objc_getAssociatedObject(view, &layoutConstraintsInstalledOnViewKey) as? Array - if constraints { + if constraints != nil { return constraints! } return []