@harnessio/ff-react-client-sdk
Advanced tools
Comparing version 1.10.0 to 1.11.0
@@ -23,9 +23,9 @@ "use strict"; | ||
(0, react_1.useEffect)(() => { | ||
if (!target?.identifier) { | ||
if (!(target === null || target === void 0 ? void 0 : target.identifier)) { | ||
console.error('[FF-SDK] target prop is required'); | ||
onError('PropsError', { message: 'target prop is required' }); | ||
} | ||
}, [target?.identifier]); | ||
}, [target === null || target === void 0 ? void 0 : target.identifier]); | ||
(0, react_1.useEffect)(() => { | ||
if (apiKey && target?.identifier) { | ||
if (apiKey && (target === null || target === void 0 ? void 0 : target.identifier)) { | ||
const client = (0, ff_javascript_client_sdk_1.initialize)(apiKey, target, options); | ||
@@ -32,0 +32,0 @@ setLoading(true); |
@@ -13,3 +13,3 @@ "use strict"; | ||
const internalNoValue = 'FF_SDK_INTERNAL_NO_VALUE'; | ||
const flagValue = client?.variation(flagName, internalNoValue); | ||
const flagValue = client === null || client === void 0 ? void 0 : client.variation(flagName, internalNoValue); | ||
if (matchValue === flagValue || | ||
@@ -16,0 +16,0 @@ (matchValue === undefined && |
@@ -17,9 +17,9 @@ import { jsx as _jsx } from "react/jsx-runtime"; | ||
useEffect(() => { | ||
if (!target?.identifier) { | ||
if (!(target === null || target === void 0 ? void 0 : target.identifier)) { | ||
console.error('[FF-SDK] target prop is required'); | ||
onError('PropsError', { message: 'target prop is required' }); | ||
} | ||
}, [target?.identifier]); | ||
}, [target === null || target === void 0 ? void 0 : target.identifier]); | ||
useEffect(() => { | ||
if (apiKey && target?.identifier) { | ||
if (apiKey && (target === null || target === void 0 ? void 0 : target.identifier)) { | ||
const client = initialize(apiKey, target, options); | ||
@@ -26,0 +26,0 @@ setLoading(true); |
@@ -10,3 +10,3 @@ import { jsx as _jsx } from "react/jsx-runtime"; | ||
const internalNoValue = 'FF_SDK_INTERNAL_NO_VALUE'; | ||
const flagValue = client?.variation(flagName, internalNoValue); | ||
const flagValue = client === null || client === void 0 ? void 0 : client.variation(flagName, internalNoValue); | ||
if (matchValue === flagValue || | ||
@@ -13,0 +13,0 @@ (matchValue === undefined && |
{ | ||
"name": "@harnessio/ff-react-client-sdk", | ||
"version": "1.10.0", | ||
"version": "1.11.0", | ||
"author": "Harness", | ||
@@ -24,3 +24,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@harnessio/ff-javascript-client-sdk": "^1.26.0", | ||
"@harnessio/ff-javascript-client-sdk": "^1.26.2", | ||
"lodash.omit": "^4.5.0" | ||
@@ -27,0 +27,0 @@ }, |
56964