Skip to content

Commit 3353997

Browse files
committed
Fixed always failing UIColor.init(hex:)
1 parent 3b52112 commit 3353997

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

TSKit.Core/Sources/Extensions/UIColor/UIColor+UInt8.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public extension UIColor {
4949
}
5050
if let value = UInt(hex, radix: 16) {
5151
self.init(value: value)
52+
} else {
53+
return nil
5254
}
53-
return nil
5455
}
5556
}

0 commit comments

Comments
 (0)