@goralys/core 1.4.1 → 1.4.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/index.js +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -431,6 +431,9 @@ async function goralysFetchClient(method, input, payload, requestOptions) {
|
|
|
431
431
|
if (!(contentType && contentType.toLowerCase().trim().includes("application/json")))
|
|
432
432
|
return res;
|
|
433
433
|
const data = await clone.json();
|
|
434
|
+
if (data?.redirect) {
|
|
435
|
+
emitNavigationEvent({ type: "redirect", url: data.redirect });
|
|
436
|
+
}
|
|
434
437
|
if (res.status === 401) {
|
|
435
438
|
try {
|
|
436
439
|
emitAuthEvent(data?.authEvent ?? "unauthenticated");
|