Fix configuration empty case
This commit is contained in:
parent
6e4c19154d
commit
be5be600c7
2 changed files with 12 additions and 10 deletions
|
@ -64,11 +64,12 @@ const PluginsDetailsPage: React.StatelessComponent<PluginsDetailsPageProps> = ({
|
|||
name === "active"
|
||||
? (newData.active = value)
|
||||
: (newData.active = data.active);
|
||||
newData.configuration.map(item => {
|
||||
if (item.name === name) {
|
||||
item.value = value;
|
||||
}
|
||||
});
|
||||
newData.configuration &&
|
||||
newData.configuration.map(item => {
|
||||
if (item.name === name) {
|
||||
item.value = value;
|
||||
}
|
||||
});
|
||||
|
||||
triggerChange();
|
||||
set(newData);
|
||||
|
|
|
@ -63,12 +63,13 @@ export const PluginsDetails: React.StatelessComponent<PluginsDetailsProps> = ({
|
|||
onBack={() => navigate(pluginsListUrl())}
|
||||
onSubmit={formData => {
|
||||
const configurationInput = [];
|
||||
formData.configuration.map(item => {
|
||||
configurationInput.push({
|
||||
name: item.name,
|
||||
value: item.value.toString()
|
||||
formData.configuration &&
|
||||
formData.configuration.map(item => {
|
||||
configurationInput.push({
|
||||
name: item.name,
|
||||
value: item.value.toString()
|
||||
});
|
||||
});
|
||||
});
|
||||
pluginUpdate({
|
||||
variables: {
|
||||
id,
|
||||
|
|
Loading…
Reference in a new issue