insert-affiliate-react-native-sdk 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -186,7 +186,7 @@ const DeepLinkIapProvider = ({ children, }) => {
186
186
  yield storeInsertAffiliateIdentifier({ link: referringLink });
187
187
  return;
188
188
  }
189
- if (!companyCode || companyCode.trim() === "") {
189
+ if (!companyCode || companyCode.trim() === "" && companyCode !== null) {
190
190
  let companyCodeFromStorage = yield getValueFromAsync(ASYNC_KEYS.COMPANY_CODE);
191
191
  if (companyCodeFromStorage !== null) {
192
192
  setCompanyCode(companyCodeFromStorage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "insert-affiliate-react-native-sdk",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "A package for connecting with the Insert Affiliate Platform to add app based affiliate marketing.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -229,6 +229,8 @@ import { useDeepLinkIapProvider } from 'insert-affiliate-react-native-sdk';
229
229
  const {setInsertAffiliateIdentifier, returnInsertAffiliateIdentifier} = useDeepLinkIapProvider();
230
230
 
231
231
  useEffect(() => {
232
+ if (!isInitialized) return;
233
+
232
234
  const branchSubscription = branch.subscribe(async ({error, params}) => {
233
235
  if (error) {
234
236
  console.error('Error from Branch:', error);
@@ -217,7 +217,7 @@ const DeepLinkIapProvider: React.FC<T_DEEPLINK_IAP_PROVIDER> = ({
217
217
  return;
218
218
  }
219
219
 
220
- if (!companyCode || companyCode.trim() === "") {
220
+ if (!companyCode || companyCode.trim() === "" && companyCode !== null) {
221
221
  let companyCodeFromStorage = await getValueFromAsync(ASYNC_KEYS.COMPANY_CODE);
222
222
 
223
223
  if (companyCodeFromStorage !== null) {