Skip to content

Commit bc6fdea

Browse files
committed
Fix if
1 parent ff431d6 commit bc6fdea

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/component/sso/SSOLoginButton.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ export const SSOLoginButton = ({ discoveryAPIUrl, hostname, port, onSSOAttempt,
99
const [discoveryUrlValidated, setDiscoveryUrlValidated] = useState(undefined);
1010

1111
const filterByProvidersList = (discoveredProviders, validProviders) => {
12-
if (validProviders.length == 0) {
13-
return discoveredProviders;
14-
}
15-
return validProviders.length == 0
12+
return validProviders == null || validProviders.length == 0
1613
? discoveredProviders
1714
: discoveredProviders.filter((p) => validProviders.includes(p.id));
1815
};

0 commit comments

Comments
 (0)