From 722e293acb1de2cc3533696ee3221aa020def23f Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Wed, 11 Sep 2024 16:23:09 -0300 Subject: [PATCH] Fix typos --- src/__tests__/connectSplit.test.ts | 2 +- src/asyncActions.ts | 2 +- src/react-redux/connectSplit.ts | 2 +- src/utils.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/__tests__/connectSplit.test.ts b/src/__tests__/connectSplit.test.ts index 65ef223..3515234 100644 --- a/src/__tests__/connectSplit.test.ts +++ b/src/__tests__/connectSplit.test.ts @@ -13,7 +13,7 @@ import { connectSplit } from '../react-redux/connectSplit'; const FeatureComponent = createComponentWithExposedProps('FeatureComponent'); describe('connectSplit', () => { - it('should pass the Split piece of state and binded getTreatment as props', () => { + it('should pass the Split piece of state and bound getTreatment as props', () => { const store = mockStore(STATE_READY); const ConnectedFeatureComponent: React.ComponentType = connectSplit()(FeatureComponent); diff --git a/src/asyncActions.ts b/src/asyncActions.ts index 6869802..f0fc39a 100644 --- a/src/asyncActions.ts +++ b/src/asyncActions.ts @@ -16,7 +16,7 @@ export interface ISplitSdk { splitio: ISplitFactoryBuilder; factory: SplitIO.ISDK; sharedClients: { [stringKey: string]: SplitIO.IClient }; - isDetached: boolean; // true: server-side, false: client-side (i.e., client with binded key) + isDetached: boolean; // true: server-side, false: client-side (i.e., client with bound key) dispatch: Dispatch; } diff --git a/src/react-redux/connectSplit.ts b/src/react-redux/connectSplit.ts index dd1dec6..b0d48e1 100644 --- a/src/react-redux/connectSplit.ts +++ b/src/react-redux/connectSplit.ts @@ -6,7 +6,7 @@ import { defaultGetSplitState } from '../selectors'; /** * This decorator connects your components with: * - The Split state at Redux, under the prop key `split`. - * - The action creator `getTreatments`, binded to the `dispatch` of your store. + * - The action creator `getTreatments`, bound to the `dispatch` of your store. * * @param {IGetSplitState} getSplitState optional function that takes the entire Redux state and returns * the state slice which corresponds to where the Split reducer was mounted. This functionality is rarely diff --git a/src/utils.ts b/src/utils.ts index 0056ef4..3af94d3 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -35,7 +35,7 @@ export function matching(key?: SplitIO.SplitKey): string | undefined { export function isMainClient(key?: SplitIO.SplitKey) { const stringKey = matching(key); - return splitSdk.isDetached || !stringKey || stringKey === matching((splitSdk.config as SplitIO.IBrowserSettings).core.key); + return splitSdk.isDetached || !stringKey || stringKey === matching(splitSdk.config && (splitSdk.config as SplitIO.IBrowserSettings).core.key); } /**