From aa3e4bc7ba9cff56e1eb268093c2f875bf558d05 Mon Sep 17 00:00:00 2001 From: Jorge Acero Date: Tue, 7 Sep 2021 17:56:12 -0500 Subject: [PATCH] fix(hybridroutes): fix bug who shows the Loading component when working with RBAC --- src/components/NextShield.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NextShield.tsx b/src/components/NextShield.tsx index bb8e394..fc0a409 100644 --- a/src/components/NextShield.tsx +++ b/src/components/NextShield.tsx @@ -86,7 +86,7 @@ export function NextShield< if ( ((isLoading || !isAuth) && pathIsPrivate) || ((isLoading || isAuth) && pathIsPublic) || - ((isLoading || userRole) && !pathIsAuthorized) || + ((isLoading || userRole) && (!pathIsAuthorized || !pathIsHybrid)) || (isLoading && pathIsHybrid) ) return <>{LoadingComponent}