Skip to content

Commit

Permalink
Fix GoToEvent link generation when value is None
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani committed Feb 27, 2024
1 parent 1964143 commit 5c8b78e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/npm-fastui/src/components/display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,7 @@ const subKeys = (template: string, row: DataModel): string | null => {
let returnNull = false
const r = template.replace(/{(.+?)}/g, (_, key: string): string => {
const v: JsonData | undefined = row[key]
if (v === undefined) {
throw new Error(`field "${key}" not found in ${JSON.stringify(row)}`)
} else if (v === null) {
if (v === null || v === undefined) {
returnNull = true
return 'null'
} else {
Expand Down

0 comments on commit 5c8b78e

Please sign in to comment.