0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(console): fix Google connector scope field can not be unset bug (#6254)

This commit is contained in:
Darcy Ye 2024-07-17 15:17:37 +08:00 committed by GitHub
parent 6fca3fe3c4
commit 3aa7e57b3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View file

@ -0,0 +1,5 @@
---
"@logto/console": patch
---
fix Google connector `scope` field can not be reset bug

View file

@ -68,7 +68,7 @@ function ConnectorContent({ isDeleted, connectorData, onConnectorUpdated }: Prop
const { syncProfile, name, logo, logoDark, target, rawConfig } = data;
// Apply the raw config first to avoid losing data updated from other forms that are not
// included in the form items.
const config = { ...rawConfig, ...configParser(data, formItems) };
const config = removeFalsyValues({ ...rawConfig, ...configParser(data, formItems) });
const payload = isSocialConnector
? {

View file

@ -27,11 +27,6 @@ export const parseFormConfig = (
return Object.fromEntries(
Object.entries(config)
.map(([key, value]) => {
// Filter out empty input
if (value === '') {
return null;
}
const formItem = formItems.find((item) => item.key === key);
if (!formItem) {