@asgardeo/react 0.5.29 → 0.5.30

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.js CHANGED
@@ -62,7 +62,8 @@ import {
62
62
  extractUserClaimsFromIdToken,
63
63
  navigate,
64
64
  getRedirectBasedSignUpUrl,
65
- Platform
65
+ Platform,
66
+ isEmpty
66
67
  } from "@asgardeo/browser";
67
68
 
68
69
  // src/__temp__/api.ts
@@ -740,7 +741,7 @@ var AsgardeoReactClient = class extends AsgardeoBrowserClient {
740
741
  const arg1 = args[0];
741
742
  const arg2 = args[1];
742
743
  const config = await this.asgardeo.getConfigData();
743
- if (config.platform === Platform.AsgardeoV2) {
744
+ if (config.platform === Platform.AsgardeoV2 && typeof arg1 === "object" && !isEmpty(arg1)) {
744
745
  const sessionDataKey = new URL(window.location.href).searchParams.get("sessionDataKey");
745
746
  return executeEmbeddedSignInFlowV2({
746
747
  payload: arg1,
@@ -1643,7 +1644,7 @@ var AsgardeoProvider = ({
1643
1644
  await fetchBranding();
1644
1645
  }, [fetchBranding]);
1645
1646
  useEffect5(() => {
1646
- if (config.platform !== Platform2.AsgardeoV2) {
1647
+ if (config.platform === Platform2.AsgardeoV2) {
1647
1648
  return;
1648
1649
  }
1649
1650
  const shouldFetchBranding = preferences?.theme?.inheritFromBranding !== false;