2
0

🐛 (dify) Fix Dify error when inputs are empty

This commit is contained in:
Baptiste Arnaud
2024-02-12 11:41:57 +01:00
parent 5226b06fe1
commit f5bdba53b9
11 changed files with 132 additions and 67 deletions

View File

@ -15,6 +15,7 @@
"@typebot.io/tsconfig": "workspace:*",
"@types/escape-html": "^1.0.4",
"@types/nodemailer": "6.4.8",
"@types/validator": "13.11.9",
"next": "14.1.0",
"nodemailer": "6.9.3",
"typescript": "5.3.2"
@ -44,7 +45,7 @@
"remark-parse": "11.0.0",
"stripe": "12.13.0",
"unified": "11.0.4",
"zod": "3.22.4",
"ky": "1.1.3"
"validator": "13.11.0",
"zod": "3.22.4"
}
}

View File

@ -0,0 +1,10 @@
import isURL, { IsURLOptions } from 'validator/lib/isURL'
const customIsURL = (val: string, options?: IsURLOptions) =>
isURL(val, {
protocols: ['https', 'http'],
require_protocol: true,
...options,
})
export { customIsURL as isURL }