@ -1,9 +1,9 @@
|
||||
import { safeStringify } from '@typebot.io/lib/safeStringify'
|
||||
import { StartChatInput, Variable } from '@typebot.io/schemas'
|
||||
import { Variable } from './types'
|
||||
|
||||
export const prefillVariables = (
|
||||
variables: Variable[],
|
||||
prefilledVariables: NonNullable<StartChatInput['prefilledVariables']>
|
||||
prefilledVariables: Record<string, any>
|
||||
): Variable[] =>
|
||||
variables.map((variable) => {
|
||||
const prefilledVariable = prefilledVariables[variable.name]
|
||||
|
Reference in New Issue
Block a user