@ -44,7 +44,6 @@ const evaluateSetVariableExpression =
|
|||||||
const func = Function(...variables.map((v) => v.id), evaluating)
|
const func = Function(...variables.map((v) => v.id), evaluating)
|
||||||
return func(...variables.map((v) => parseCorrectValueType(v.value)))
|
return func(...variables.map((v) => parseCorrectValueType(v.value)))
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(`Evaluating: ${evaluating}`, err)
|
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,12 +32,6 @@ export const getServerSideProps: GetServerSideProps = async (
|
|||||||
const publishedTypebot = isMatchingViewerUrl
|
const publishedTypebot = isMatchingViewerUrl
|
||||||
? await getTypebotFromPublicId(context.query.publicId?.toString())
|
? await getTypebotFromPublicId(context.query.publicId?.toString())
|
||||||
: await getTypebotFromCustomDomain(customDomain)
|
: await getTypebotFromCustomDomain(customDomain)
|
||||||
if (!publishedTypebot)
|
|
||||||
console.log(
|
|
||||||
isMatchingViewerUrl
|
|
||||||
? `Couldn't find publicId: ${context.query.publicId?.toString()}`
|
|
||||||
: `Couldn't find customDomain: ${customDomain}`
|
|
||||||
)
|
|
||||||
const headCode = publishedTypebot?.settings.metadata.customHeadCode
|
const headCode = publishedTypebot?.settings.metadata.customHeadCode
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
|
@ -26,12 +26,6 @@ export const getServerSideProps: GetServerSideProps = async (
|
|||||||
const typebot = isMatchingViewerUrl
|
const typebot = isMatchingViewerUrl
|
||||||
? await getTypebotFromPublicId(context.query.publicId?.toString())
|
? await getTypebotFromPublicId(context.query.publicId?.toString())
|
||||||
: null
|
: null
|
||||||
if (!typebot)
|
|
||||||
console.log(
|
|
||||||
isMatchingViewerUrl
|
|
||||||
? `Couldn't find publicId: ${context.query.publicId?.toString()}`
|
|
||||||
: `Couldn't find customDomain`
|
|
||||||
)
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
typebot,
|
typebot,
|
||||||
|
@ -30,7 +30,6 @@ const evaluateSetVariableExpression =
|
|||||||
const func = Function(...variables.map((v) => v.id), evaluating)
|
const func = Function(...variables.map((v) => v.id), evaluating)
|
||||||
return func(...variables.map((v) => parseCorrectValueType(v.value)))
|
return func(...variables.map((v) => parseCorrectValueType(v.value)))
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(`Evaluating: ${evaluating}`, err)
|
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user