@asgardeo/react 0.22.2 → 0.22.3
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 +6 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +6 -4
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1324,13 +1324,16 @@ var FlowMetaProvider = ({
|
|
|
1324
1324
|
const [isLoading, setIsLoading] = (0, import_react10.useState)(true);
|
|
1325
1325
|
const [error, setError] = (0, import_react10.useState)(null);
|
|
1326
1326
|
const [pendingLanguage, setPendingLanguage] = (0, import_react10.useState)(null);
|
|
1327
|
-
const
|
|
1327
|
+
const lastFetchedRef = (0, import_react10.useRef)(null);
|
|
1328
1328
|
const fetchFlowMeta = (0, import_react10.useCallback)(async () => {
|
|
1329
1329
|
if (!enabled || platform !== import_browser10.Platform.AsgardeoV2) {
|
|
1330
1330
|
setMeta(null);
|
|
1331
1331
|
setIsLoading(false);
|
|
1332
1332
|
return;
|
|
1333
1333
|
}
|
|
1334
|
+
if (!applicationId) {
|
|
1335
|
+
return;
|
|
1336
|
+
}
|
|
1334
1337
|
setIsLoading(true);
|
|
1335
1338
|
setError(null);
|
|
1336
1339
|
try {
|
|
@@ -1384,11 +1387,10 @@ var FlowMetaProvider = ({
|
|
|
1384
1387
|
}
|
|
1385
1388
|
}, [pendingLanguage, i18nContext?.setLanguage]);
|
|
1386
1389
|
(0, import_react10.useEffect)(() => {
|
|
1387
|
-
if (
|
|
1388
|
-
hasFetchedRef.current = true;
|
|
1389
|
-
fetchFlowMeta();
|
|
1390
|
+
if (lastFetchedRef.current === fetchFlowMeta) {
|
|
1390
1391
|
return;
|
|
1391
1392
|
}
|
|
1393
|
+
lastFetchedRef.current = fetchFlowMeta;
|
|
1392
1394
|
fetchFlowMeta();
|
|
1393
1395
|
}, [fetchFlowMeta]);
|
|
1394
1396
|
(0, import_react10.useEffect)(() => {
|