Skip to content

Commit c68676a

Browse files
authored
Merge pull request #148 from wojtekmaj/fix-ts-error
Fix TypeScript warning
2 parents 7057383 + a53d8df commit c68676a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/initLDClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { initialize as ldClientInitialize, LDFlagSet, LDOptions, LDUser } from 'launchdarkly-js-client-sdk';
22
import { AllFlagsLDClient, defaultReactOptions, LDReactOptions } from './types';
33
import { fetchFlags } from './utils';
4-
import { version } from '../package.json';
4+
import * as packageInfo from '../package.json';
55

66
/**
77
* Internal function to initialize the `LDClient`.
@@ -22,7 +22,7 @@ const initLDClient = async (
2222
options?: LDOptions,
2323
targetFlags?: LDFlagSet,
2424
): Promise<AllFlagsLDClient> => {
25-
const allOptions = { wrapperName: 'react-client-sdk', wrapperVersion: version, ...options };
25+
const allOptions = { wrapperName: 'react-client-sdk', wrapperVersion: packageInfo.version, ...options };
2626
const ldClient = ldClientInitialize(clientSideID, user, allOptions);
2727

2828
return new Promise<AllFlagsLDClient>((resolve) => {

0 commit comments

Comments
 (0)