From c3455ac88854624f33c2a70b6784cfe154ea57a3 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Tue, 2 Sep 2025 17:14:17 +0200 Subject: [PATCH] [bug] fix parseKey --- src/database.service.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/database.service.ts b/src/database.service.ts index 32ee07b..172a8a1 100644 --- a/src/database.service.ts +++ b/src/database.service.ts @@ -60,9 +60,13 @@ export default class Database { } private parseKey(fullKey: string): { storeName: string; key: string } | null { - const parts = fullKey.split(':', 2); - if (parts.length !== 2) return null; - return { storeName: parts[0], key: parts[1] }; + const colonIndex = fullKey.indexOf(':'); + if (colonIndex === -1) return null; + + const storeName = fullKey.substring(0, colonIndex); + const key = fullKey.substring(colonIndex + 1); + + return { storeName, key }; } /**