[bug] fix parseKey

This commit is contained in:
Sosthene 2025-09-02 17:14:17 +02:00
parent 93eb637f1c
commit c3455ac888

View File

@ -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 };
}
/**