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:
parent
6fca3fe3c4
commit
3aa7e57b3d
3 changed files with 6 additions and 6 deletions
5
.changeset/cool-otters-unite.md
Normal file
5
.changeset/cool-otters-unite.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@logto/console": patch
|
||||
---
|
||||
|
||||
fix Google connector `scope` field can not be reset bug
|
|
@ -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
|
||||
? {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue