Browse Source

Fix for debug description in case if constant equals to 0

Pavel Mazurin 11 years ago
parent
commit
499ef3536b
1 changed files with 4 additions and 4 deletions
  1. 4 4
      Masonry/NSLayoutConstraint+MASDebugAdditions.m

+ 4 - 4
Masonry/NSLayoutConstraint+MASDebugAdditions.m

@@ -110,10 +110,10 @@
         [description appendFormat:@" * %g", self.multiplier];
     }
     
-    if (self.constant) {
-        if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) {
-            [description appendFormat:@" %g", self.constant];
-        } else {
+    if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) {
+        [description appendFormat:@" %g", self.constant];
+    } else {
+        if (self.constant) {
             [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)];
         }
     }