mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-04-30 05:30:12 -05:00
[Infra]: Removed duplicate call to .find method on the errors object
This commit is contained in:
@@ -102,9 +102,8 @@ const CreateInfrastructureMonitor = () => {
|
||||
};
|
||||
|
||||
const getAlertError = (errors) => {
|
||||
return Object.keys(errors).find((key) => key.startsWith(METRIC_PREFIX))
|
||||
? errors[Object.keys(errors).find((key) => key.startsWith(METRIC_PREFIX))]
|
||||
: null;
|
||||
const errorKey = Object.keys(errors).find((key) => key.startsWith(METRIC_PREFIX));
|
||||
return errorKey ? errors[errorKey] : null;
|
||||
};
|
||||
|
||||
// Populate form fields if editing
|
||||
|
||||
Reference in New Issue
Block a user