From bd1bea9130ecb0f564bafa4d2a063c984e42d4b9 Mon Sep 17 00:00:00 2001 From: Mike Burgess Date: Fri, 3 Feb 2023 12:11:30 +0000 Subject: [PATCH] Fix dashboard panel detail crash when viewing data tables with non-string values in text columns. Fixes #3071. --- CHANGELOG.md | 4 ++++ ui/dashboard/src/components/dashboards/Table/index.tsx | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8aa39d5e..318c497ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.18.4 [TBD] +_Bug fixes_ +* Fix dashboard panel detail crash when viewing data tables with non-string values in text columns. ([#3071](https://github.com/turbot/steampipe/issues/3071)) + ## v0.18.3 [2022-02-01] _Bug fixes_ * Fix issue where `search_path` is not getting set from connection-config watching in service mode. ([#3047](https://github.com/turbot/steampipe/issues/3047)) diff --git a/ui/dashboard/src/components/dashboards/Table/index.tsx b/ui/dashboard/src/components/dashboards/Table/index.tsx index 5184c5afc..18ea92b7d 100644 --- a/ui/dashboard/src/components/dashboards/Table/index.tsx +++ b/ui/dashboard/src/components/dashboards/Table/index.tsx @@ -253,7 +253,7 @@ const CellValue = ({ ); } else if (dataType === "text") { - if (value.match("^https?://")) { + if (!!value.match && value.match("^https?://")) { cellContent = ( ); } - const mdMatch = value.match("^\\[(.*)\\]\\((https?://.*)\\)$"); + const mdMatch = !!value.match && value.match("^\\[(.*)\\]\\((https?://.*)\\)$"); if (mdMatch) { cellContent = (