Browse Source

Ensure both label and value are set when defining custom options

master
Andrew Kingston 5 years ago
parent
commit
bc788273a0
  1. 2
      packages/builder/src/components/design/PropertiesPanel/PropertyControls/OptionsEditor/OptionsEditor.svelte

2
packages/builder/src/components/design/PropertiesPanel/PropertyControls/OptionsEditor/OptionsEditor.svelte

@ -12,7 +12,7 @@
const saveFilter = async () => {
// Filter out null objects
tempValue = tempValue.filter(optionValue => optionValue.value)
tempValue = tempValue.filter(option => option.value && option.label)
dispatch("change", tempValue)
notifications.success("Options saved.")
drawer.hide()

Loading…
Cancel
Save