We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b114ce4 commit c860098Copy full SHA for c860098
lib/cache/memory-cache-store.js
@@ -80,6 +80,8 @@ class MemoryCacheStore {
80
get (key) {
81
const values = this.#getValuesForRequest(key)
82
const value = findValue(key, values)
83
+
84
+ // TODO (perf): Faster with explicit props...
85
return value != null ? { ...value } : undefined
86
}
87
@@ -109,9 +111,10 @@ class MemoryCacheStore {
109
111
const store = this
110
112
const body = []
113
- // TODO (fix): Make sure user can't modify...
- // key = structuredClone(key)
114
- // opts = structuredClone(opts)
+ // TODO (fix): Deep clone...
115
116
+ key = { ...key }
117
+ opts = { ...opts }
118
119
return new Writable({
120
write (chunk, encoding, callback) {
0 commit comments