diff --git a/packages/storage-memory/src/index.ts b/packages/storage-memory/src/index.ts index 00a0b1d..faa9eb6 100644 --- a/packages/storage-memory/src/index.ts +++ b/packages/storage-memory/src/index.ts @@ -10,7 +10,11 @@ export class MemoryStorage implements IStorage { } public async setItem(key: string, content: any): Promise { - this.memCache[key] = content + if (content === undefined) { + delete this.memCache[key]; + } else { + this.memCache[key] = content + } } public async clear(): Promise {