Fix bug in isProviderVisible().

This commit is contained in:
Yang Luo
2021-06-17 01:49:05 +08:00
parent 9dd43238f0
commit 5b9a91db85

View File

@ -43,14 +43,18 @@ export function isProviderVisible(providerItem) {
return false;
}
if (providerItem.provider.type !== "GitHub") {
return true;
if (providerItem.provider.category !== "OAuth") {
return false;
}
if (isLocalhost()) {
return providerItem.provider.name.includes("localhost");
if (providerItem.provider.type === "GitHub") {
if (isLocalhost()) {
return providerItem.provider.name.includes("localhost");
} else {
return !providerItem.provider.name.includes("localhost");
}
} else {
return !providerItem.provider.name.includes("localhost");
return true;
}
}