mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
Co-authored-by: enisdenjo <badurinadenis@gmail.com> Co-authored-by: Denis Badurina <denis@domonda.com>
17 lines
552 B
Diff
17 lines
552 B
Diff
diff --git a/index.mjs b/index.mjs
|
|
index 7db160e..a94f537 100644
|
|
--- a/index.mjs
|
|
+++ b/index.mjs
|
|
@@ -61,10 +61,11 @@ function sharePromise(setter) {
|
|
return sharedPromise;
|
|
};
|
|
}
|
|
-const cacheSymbol = Symbol.for("@cache");
|
|
function cacheResult(cacheKeyFn) {
|
|
return (_target, _propertyKey, descriptor) => {
|
|
const originalMethod = descriptor.value;
|
|
+ const cacheSymbol = Symbol('@cache');
|
|
+
|
|
function ensureCache(obj) {
|
|
if (!obj[cacheSymbol]) {
|
|
obj[cacheSymbol] = new Map();
|