[bug] fix parseKey
This commit is contained in:
parent
93eb637f1c
commit
c3455ac888
@ -60,9 +60,13 @@ export default class Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private parseKey(fullKey: string): { storeName: string; key: string } | null {
|
private parseKey(fullKey: string): { storeName: string; key: string } | null {
|
||||||
const parts = fullKey.split(':', 2);
|
const colonIndex = fullKey.indexOf(':');
|
||||||
if (parts.length !== 2) return null;
|
if (colonIndex === -1) return null;
|
||||||
return { storeName: parts[0], key: parts[1] };
|
|
||||||
|
const storeName = fullKey.substring(0, colonIndex);
|
||||||
|
const key = fullKey.substring(colonIndex + 1);
|
||||||
|
|
||||||
|
return { storeName, key };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user