Skip to content

Commit 04e9225

Browse files
committed
refactor function to remove void usage
1 parent 05fe838 commit 04e9225

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

framework/PageSettings/PageSettingsProvider.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,17 @@ export function PageSettingsProvider(props: {
9797
// Use SWR's default retry logic for other errors
9898
// (exponential backoff with max 3 retries)
9999
if (retryCount >= 3) return false;
100-
void setTimeout(() => void revalidate({ retryCount }), Math.pow(2, retryCount) * 1000);
100+
setTimeout(
101+
() => {
102+
const result = revalidate({ retryCount });
103+
if (result && typeof result.catch === 'function') {
104+
result.catch(() => {
105+
// Ignore revalidation errors during retry
106+
});
107+
}
108+
},
109+
Math.pow(2, retryCount) * 1000
110+
);
101111
},
102112
}}
103113
>

0 commit comments

Comments
 (0)