mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
fix: handle non-ok repsoness
This commit is contained in:
1 parent
1ad75d8dc5
commit
63a608b3df
1 file changed
+3
@@ -15,6 +15,9 @@ export function useAdExempt() {
|
||||
`/api/patreon/membership/${patreon.token}`,
|
||||
{ cache: 'force-cache' },
|
||||
);
|
||||
|
||||
if (!response.ok) return resolve(false);
|
||||
|
||||
const json = await response.json();
|
||||
const exempt = typeof json === 'boolean' && json;
|
||||
cache[patreon.token] = exempt;
|
||||
|
||||
Reference in new issue
Block a user