Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tryfinch/react-connect

Package Overview
Dependencies
Maintainers
6
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryfinch/react-connect - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

22

dist/index.es.js

@@ -1,2 +0,2 @@

import { useEffect } from 'react';
import { useRef, useEffect } from 'react';

@@ -26,3 +26,3 @@ const BASE_FINCH_CONNECT_URI = 'https://connect.tryfinch.com';

// replace with actual SDK version by rollup
authUrl.searchParams.append('sdk_version', 'react-3.3.0');
authUrl.searchParams.append('sdk_version', 'react-3.3.1');
return authUrl.href;

@@ -49,8 +49,14 @@ };

throw new Error('must specify clientId in options for useFinchConnect');
if (isUseFinchConnectInitialized) {
console.error('One useFinchConnect hook has already been registered. Please ensure to only call useFinchConnect once to avoid your event callbacks getting called more than once. You can pass in override options to the open function if you so require.');
}
else {
isUseFinchConnectInitialized = true;
}
const isHookMounted = useRef(false);
useEffect(() => {
if (!isHookMounted.current) {
if (isUseFinchConnectInitialized) {
console.error('One useFinchConnect hook has already been registered. Please ensure to only call useFinchConnect once to avoid your event callbacks getting called more than once. You can pass in override options to the open function if you so require.');
}
else {
isUseFinchConnectInitialized = true;
}
isHookMounted.current = true;
}
}, []);
const combinedOptions = Object.assign(Object.assign({ clientId: '' }, DEFAULT_OPTIONS), options);

@@ -57,0 +63,0 @@ const open = (overrides) => {

@@ -30,3 +30,3 @@ 'use strict';

// replace with actual SDK version by rollup
authUrl.searchParams.append('sdk_version', 'react-3.3.0');
authUrl.searchParams.append('sdk_version', 'react-3.3.1');
return authUrl.href;

@@ -53,8 +53,14 @@ };

throw new Error('must specify clientId in options for useFinchConnect');
if (isUseFinchConnectInitialized) {
console.error('One useFinchConnect hook has already been registered. Please ensure to only call useFinchConnect once to avoid your event callbacks getting called more than once. You can pass in override options to the open function if you so require.');
}
else {
isUseFinchConnectInitialized = true;
}
const isHookMounted = react.useRef(false);
react.useEffect(() => {
if (!isHookMounted.current) {
if (isUseFinchConnectInitialized) {
console.error('One useFinchConnect hook has already been registered. Please ensure to only call useFinchConnect once to avoid your event callbacks getting called more than once. You can pass in override options to the open function if you so require.');
}
else {
isUseFinchConnectInitialized = true;
}
isHookMounted.current = true;
}
}, []);
const combinedOptions = Object.assign(Object.assign({ clientId: '' }, DEFAULT_OPTIONS), options);

@@ -61,0 +67,0 @@ const open = (overrides) => {

{
"name": "@tryfinch/react-connect",
"version": "3.3.0",
"version": "3.3.1",
"description": "Finch SDK for embedding Finch Connect in API React Single Page Applications (SPA)",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,2 +0,2 @@

import { useEffect } from 'react';
import { useEffect, useRef } from 'react';

@@ -110,11 +110,18 @@ export type SuccessEvent = {

if (!options.clientId) throw new Error('must specify clientId in options for useFinchConnect');
const isHookMounted = useRef(false);
if (isUseFinchConnectInitialized) {
console.error(
'One useFinchConnect hook has already been registered. Please ensure to only call useFinchConnect once to avoid your event callbacks getting called more than once. You can pass in override options to the open function if you so require.'
);
} else {
isUseFinchConnectInitialized = true;
}
useEffect(() => {
if (!isHookMounted.current) {
if (isUseFinchConnectInitialized) {
console.error(
'One useFinchConnect hook has already been registered. Please ensure to only call useFinchConnect once to avoid your event callbacks getting called more than once. You can pass in override options to the open function if you so require.'
);
} else {
isUseFinchConnectInitialized = true;
}
isHookMounted.current = true;
}
}, []);
const combinedOptions: ConnectOptions = {

@@ -121,0 +128,0 @@ clientId: '',

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc