console/patches/@theguild__buddy@0.1.0.patch
Dimitri POSTOLOV 12ceda69dc
Use pnpm instead of yarn (#477)
Co-authored-by: enisdenjo <badurinadenis@gmail.com>
Co-authored-by: Denis Badurina <denis@domonda.com>
2022-11-01 02:11:53 +02:00

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();