Fix initialisation

This commit is contained in:
Adria Navarro 2024-07-12 12:32:36 +02:00
parent f06d0a5cd6
commit 1c69cfaeda
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ function validate(
property: string,
opts?: { errorPrefix?: string; allowUnknown?: boolean }
) {
const errorPrefix = opts?.errorPrefix || `Invalid ${property}`
const errorPrefix = opts?.errorPrefix ?? `Invalid ${property}`
// Return a Koa middleware function
return (ctx: Ctx, next: any) => {
if (!schema) {