From ff96368f41b4261493eca76cf3d4349de5b91b2a Mon Sep 17 00:00:00 2001 From: Jonas Hansbo <103502067+jhansbo@users.noreply.github.com> Date: Thu, 13 Oct 2022 11:48:58 +0200 Subject: [PATCH] Fixed crash bug --- Sources/TextTable/TextTable.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/TextTable/TextTable.swift b/Sources/TextTable/TextTable.swift index 0c18b1a..68c9ed9 100644 --- a/Sources/TextTable/TextTable.swift +++ b/Sources/TextTable/TextTable.swift @@ -271,7 +271,8 @@ public struct TextTable { - parameter style: The style of table to be rendered. See `Style` for more options. */ public func print(_ data: C, style: TextTableStyle.Type = Style.simple) where C.Iterator.Element == T { - let table = string(for: data, style: style)! - Swift.print(table) + if let table = string(for: data, style: style) { + Swift.print(table) + } } }