From 1c69cfaeda18e81640fcf50ae2c6657e324e4b18 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 12 Jul 2024 12:32:36 +0200 Subject: [PATCH] Fix initialisation --- packages/backend-core/src/middleware/joi-validator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend-core/src/middleware/joi-validator.ts b/packages/backend-core/src/middleware/joi-validator.ts index 7575e7e778..a85c0e7108 100644 --- a/packages/backend-core/src/middleware/joi-validator.ts +++ b/packages/backend-core/src/middleware/joi-validator.ts @@ -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) {