From 54b3f359acb8ec4c62057e3cee4587eb65cdf73e Mon Sep 17 00:00:00 2001 From: StasiumDev <41346624+StasiumDev@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:35:41 +0200 Subject: [PATCH] fix: final fix for the startswith function of the mongodriver --- src/drivers/MongoDriver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/MongoDriver.ts b/src/drivers/MongoDriver.ts index 117fe9c7..65dbb992 100644 --- a/src/drivers/MongoDriver.ts +++ b/src/drivers/MongoDriver.ts @@ -135,7 +135,7 @@ export class MongoDriver implements IRemoteDriver { const model = await this.getModel(table); const res = await model!.find({ ID: { - $regex: `/^${query}/i`, + $regex: new RegExp(query, "i"), }, });