Skip to content

Commit 2bb7e70

Browse files
committed
fix: remove structured clone
1 parent 556125d commit 2bb7e70

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/proud-times-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/pacer': patch
3+
---
4+
5+
fix: remove structuredClone from async utils

packages/pacer/src/async-retryer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export interface AsyncRetryerState<TFn extends AnyAsyncFunction> {
4545
function getDefaultAsyncRetryerState<
4646
TFn extends AnyAsyncFunction,
4747
>(): AsyncRetryerState<TFn> {
48-
return structuredClone({
48+
return {
4949
currentAttempt: 0,
5050
executionCount: 0,
5151
isExecuting: false,
@@ -54,7 +54,7 @@ function getDefaultAsyncRetryerState<
5454
lastResult: undefined,
5555
status: 'idle',
5656
totalExecutionTime: 0,
57-
})
57+
}
5858
}
5959

6060
export interface AsyncRetryerOptions<TFn extends AnyAsyncFunction> {

0 commit comments

Comments
 (0)