Skip to content

Commit

Permalink
Fix GoToEvent link generation when value is None (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani authored Apr 23, 2024
1 parent 22ea414 commit 5995dfe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/npm-fastui/src/components/display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5995dfe

Please sign in to comment.