@asgardeo/react 0.16.1 → 0.16.2

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/cjs/index.js CHANGED
@@ -1296,7 +1296,7 @@ var FlowMetaProvider = ({
1296
1296
  children,
1297
1297
  enabled = true
1298
1298
  }) => {
1299
- const { baseUrl, applicationId } = useAsgardeo_default();
1299
+ const { baseUrl, applicationId, platform } = useAsgardeo_default();
1300
1300
  const i18nContext = useI18n_default();
1301
1301
  const [meta, setMeta] = (0, import_react10.useState)(null);
1302
1302
  const [isLoading, setIsLoading] = (0, import_react10.useState)(false);
@@ -1304,7 +1304,7 @@ var FlowMetaProvider = ({
1304
1304
  const [pendingLanguage, setPendingLanguage] = (0, import_react10.useState)(null);
1305
1305
  const hasFetchedRef = (0, import_react10.useRef)(false);
1306
1306
  const fetchFlowMeta = (0, import_react10.useCallback)(async () => {
1307
- if (!enabled) {
1307
+ if (!enabled || platform !== import_browser10.Platform.AsgardeoV2) {
1308
1308
  setMeta(null);
1309
1309
  return;
1310
1310
  }
@@ -1322,10 +1322,10 @@ var FlowMetaProvider = ({
1322
1322
  } finally {
1323
1323
  setIsLoading(false);
1324
1324
  }
1325
- }, [enabled, baseUrl, applicationId, i18nContext?.currentLanguage]);
1325
+ }, [enabled, platform, baseUrl, applicationId, i18nContext?.currentLanguage]);
1326
1326
  const switchLanguage = (0, import_react10.useCallback)(
1327
1327
  async (language) => {
1328
- if (!enabled) return;
1328
+ if (!enabled || platform !== import_browser10.Platform.AsgardeoV2) return;
1329
1329
  setIsLoading(true);
1330
1330
  setError(null);
1331
1331
  try {
@@ -1352,7 +1352,7 @@ var FlowMetaProvider = ({
1352
1352
  setIsLoading(false);
1353
1353
  }
1354
1354
  },
1355
- [enabled, baseUrl, applicationId, i18nContext]
1355
+ [enabled, platform, baseUrl, applicationId, i18nContext]
1356
1356
  );
1357
1357
  (0, import_react10.useEffect)(() => {
1358
1358
  if (pendingLanguage && i18nContext?.setLanguage) {