diff --git a/package/shared/resource/cache/index.ts b/package/shared/resource/cache/index.ts index acf0a6fed..743ef77bf 100644 --- a/package/shared/resource/cache/index.ts +++ b/package/shared/resource/cache/index.ts @@ -5,13 +5,13 @@ export const cache: Record = new Proxy( { get(target, key: string) { const result = key ? target[key] : target; - if (result) return result; + if (result !== undefined) return result; AddEventHandler(`ox_lib:cache:${key}`, (value: any) => { target[key] = value; }); - target[key] = exports.ox_lib.cache(key); + target[key] = exports.ox_lib.cache(key) || false; return target[key]; }, }