We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9f429c commit 30962deCopy full SHA for 30962de
packages/framework/memo-cache/src/getCacheEntry.ts
@@ -22,7 +22,7 @@ export type CacheEntry<T, TGet = any> = {
22
* @param key - which key of that entry to ensure the value for
23
*/
24
function ensureAndReturn(entry: CacheEntry<any>, key: keyof CacheEntry<any>): CacheEntry<any> | { [key: string]: CacheEntry<any> } {
25
- if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
+ if ((key as string) === '__proto__' || (key as string) === 'constructor' || (key as string) === 'prototype') {
26
throw new Error('Invalid key');
27
}
28
return (entry[key] = entry[key] || {});
0 commit comments