From 5995dfea9e2df4dc8144ea9f388d0166a93d9899 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Tue, 23 Apr 2024 15:15:07 +0200 Subject: [PATCH] Fix GoToEvent link generation when value is None (#224) --- src/npm-fastui/src/components/display.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/npm-fastui/src/components/display.tsx b/src/npm-fastui/src/components/display.tsx index 6fbe4d3d..30bb2c14 100644 --- a/src/npm-fastui/src/components/display.tsx +++ b/src/npm-fastui/src/components/display.tsx @@ -203,7 +203,12 @@ export function renderEvent(event: AnyEvent | undefined, data: DataModel): AnyEv if (newEvent) { if (newEvent.type === 'go-to' && newEvent.url) { // for go-to events with a URL, substitute the row values into the url - const url = subKeys(newEvent.url, data) + let url: string | null = null + try { + url = subKeys(newEvent.url, data) + } catch (e) { + url = null + } if (url === null) { newEvent = undefined } else {