Skip to content

Commit a1fd0bb

Browse files
cleanup
1 parent d73d9d2 commit a1fd0bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/web/src/worker/sync/SharedSyncImplementation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,11 @@ function withAbort<T>(options: {
624624

625625
action()
626626
.then((data) => {
627-
completePromise(() => resolve(data));
628627
// We already rejected due to the abort, allow for cleanup
629628
if (signal.aborted) {
630-
cleanupOnAbort?.(data);
629+
return completePromise(() => cleanupOnAbort?.(data));
631630
}
631+
completePromise(() => resolve(data));
632632
})
633633
.catch((e) => completePromise(() => reject(e)));
634634
});

0 commit comments

Comments
 (0)