@pelcro/react-pelcro-js 2.7.0-beta.3 → 2.7.0-beta.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.
package/dist/index.cjs.js CHANGED
@@ -10189,12 +10189,11 @@ const Auth0LoginButton = ({
10189
10189
  labelClassName = "",
10190
10190
  iconClassName = ""
10191
10191
  }) => {
10192
- const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
10193
-
10194
- if (auth0Enabled && !window.auth0) {
10192
+ if (!window.auth0 && window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url) {
10195
10193
  console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
10196
10194
  }
10197
10195
 
10196
+ const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
10198
10197
  const auth0InstanceRef = React__default['default'].useRef(null);
10199
10198
  React__default['default'].useEffect(() => {
10200
10199
  if (auth0Enabled) {
package/dist/index.esm.js CHANGED
@@ -10159,12 +10159,11 @@ const Auth0LoginButton = ({
10159
10159
  labelClassName = "",
10160
10160
  iconClassName = ""
10161
10161
  }) => {
10162
- const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
10163
-
10164
- if (auth0Enabled && !window.auth0) {
10162
+ if (!window.auth0 && window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url) {
10165
10163
  console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
10166
10164
  }
10167
10165
 
10166
+ const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
10168
10167
  const auth0InstanceRef = React__default.useRef(null);
10169
10168
  React__default.useEffect(() => {
10170
10169
  if (auth0Enabled) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "2.7.0-beta.3",
4
+ "version": "2.7.0-beta.4",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",