Skip to content

Commit 4760132

Browse files
Rename internal var
1 parent 6b87017 commit 4760132

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sdkFactory/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ export function sdkFactory(params: ISdkFactoryParams): SplitIO.ICsSDK | SplitIO.
3030
// On non-recoverable errors, we should mark the SDK as destroyed and not start synchronization.
3131

3232
// initialization
33-
let isInit = false;
33+
let hasInit = false;
3434
const initCallbacks: (() => void)[] = [];
3535

3636
function whenInit(cb: () => void) {
37-
if (isInit) cb();
37+
if (hasInit) cb();
3838
else initCallbacks.push(cb);
3939
}
4040

@@ -93,8 +93,8 @@ export function sdkFactory(params: ISdkFactoryParams): SplitIO.ICsSDK | SplitIO.
9393

9494

9595
function init() {
96-
if (isInit) return;
97-
isInit = true;
96+
if (hasInit) return;
97+
hasInit = true;
9898

9999
// We will just log and allow for the SDK to end up throwing an SDK_TIMEOUT event for devs to handle.
100100
validateAndTrackApiKey(log, settings.core.authorizationKey);

0 commit comments

Comments
 (0)