diff options
Diffstat (limited to 'src/hypixelCached.ts')
-rw-r--r-- | src/hypixelCached.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts index 26e3dc5..d5b6628 100644 --- a/src/hypixelCached.ts +++ b/src/hypixelCached.ts @@ -71,7 +71,7 @@ function waitForCacheSet(cache: NodeCache, key?: string, value?: string): Promis const listener = (setKey, setValue) => { // we check that the setValue isn't a promise because it's often // set as a promise for this exact function - if (((setKey === key) || (value && setValue === value)) && (!setValue.then)) { + if (((setKey === key) || (value && setValue === value)) && (!setValue?.then)) { cache.removeListener('set', listener) return resolve({ key: setKey, value: setValue }) } |