Skip to content

Commit 9e40115

Browse files
committed
refactor: simplify timeout handling in Iterable class by removing unnecessary variable
1 parent 4386436 commit 9e40115

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/classes/Iterable.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ export class Iterable {
10181018
(promiseResult as IterableAuthResponse).authToken
10191019
);
10201020

1021-
const timeoutId = setTimeout(() => {
1021+
setTimeout(() => {
10221022
if (
10231023
authResponseCallback === IterableAuthResponseResult.SUCCESS
10241024
) {
@@ -1038,7 +1038,6 @@ export class Iterable {
10381038
}
10391039
}, 1000);
10401040
// Use unref() to prevent the timeout from keeping the process alive
1041-
timeoutId.unref();
10421041
} else if (typeof promiseResult === 'string') {
10431042
//If promise only returns string
10441043
Iterable.authManager.passAlongAuthToken(promiseResult as string);

0 commit comments

Comments
 (0)