Skip to content

Commit

Permalink
address the comments
Browse files Browse the repository at this point in the history
Signed-off-by: Riya Saxena <[email protected]>
  • Loading branch information
riysaxen-amzn committed Jun 4, 2024
1 parent b55d0f2 commit d39c92b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class ConfigureTriggers extends React.Component {
}

async onQueryMappings() {
const indices = this.props.monitor.inputs[0].search?.indices;
const indices = this.props.monitor.inputs[0].search?.indices || [];
try {
const mappings = await this.queryMappings(indices);
const dataTypes = getPathsPerDataType(mappings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export default class CreateTrigger extends Component {
}

async onQueryMappings() {
const indices = this.props.monitor.inputs[0].search?.indices;
const indices = this.props.monitor.inputs[0].search?.indices || [];
try {
const mappings = await this.queryMappings(indices);
const dataTypes = getPathsPerDataType(mappings);
Expand Down
2 changes: 1 addition & 1 deletion public/utils/contextMenu/monitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const parseMonitor = (monitor) => {
date: latestAlert, // this is the last alert time
id: monitor.id,
type: monitor.monitor.monitor_type,
indexes: monitor.monitor.inputs[0].search?.indices,
indexes: monitor.monitor.inputs[0].search?.indices || [],
triggers: [{ name: 'example trigger' }],
activeAlerts: monitor.active,
};
Expand Down

0 comments on commit d39c92b

Please sign in to comment.