Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
  • Loading branch information
lezzago committed Jul 20, 2023
1 parent f8bfc04 commit e47d290
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions public/utils/savedObjectHelper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,9 @@ export const deleteAlertingAugmentVisSavedObj = async (
).then(async (resp) => {
if (resp !== undefined) {
const savedAugmentObjects = get(resp, 'hits', []);
// gets all the saved object for this visualization
const savedAugmentForThisVisualization = savedAugmentObjects.filter(
(savedObj) => get(savedObj, 'visId', '') === visId
);

// find saved Augment object matching detector we want to unlink
// There should only be one detector and vis pairing
const savedAugmentToUnlink = savedAugmentForThisVisualization.find(
const savedAugmentToUnlink = savedAugmentObjects.find(
(savedObject) => get(savedObject, 'pluginResource.id', '') === monitorId
);
const savedObjectToUnlinkId = get(savedAugmentToUnlink, 'id', '');
Expand Down

0 comments on commit e47d290

Please sign in to comment.