mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Fix lookup and color field formatters (#84994)
* fix lookup field formatter * fix color formatter
This commit is contained in:
parent
71f863ef66
commit
e7d8dd48f3
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ export class ColorFormatEditor extends DefaultFormatEditor<ColorFormatEditorForm
|
|||
};
|
||||
|
||||
addColor = () => {
|
||||
const colors = [...this.props.formatParams.colors];
|
||||
const colors = [...(this.props.formatParams.colors || [])];
|
||||
this.onChange({
|
||||
colors: [...colors, { ...fieldFormats.DEFAULT_CONVERTER_COLOR }],
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export class StaticLookupFormatEditor extends DefaultFormatEditor<StaticLookupFo
|
|||
};
|
||||
|
||||
addLookup = () => {
|
||||
const lookupEntries = [...this.props.formatParams.lookupEntries];
|
||||
const lookupEntries = [...(this.props.formatParams.lookupEntries || [])];
|
||||
this.onChange({
|
||||
lookupEntries: [...lookupEntries, {}],
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue