Skip to content

Commit

Permalink
fix(alert-rules): Use the data default value for time selectors in Se…
Browse files Browse the repository at this point in the history
…lectControl
  • Loading branch information
taylangocmen committed Sep 24, 2021
1 parent 45f4733 commit 7cfb4d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion static/app/views/alerts/issueRuleEditor/ruleNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ class RuleNode extends React.Component<Props> {
initialVal = fieldConfig.choices[0][0];
}
} else {
initialVal = data[name];
initialVal =
/\d+[smhdwy]$/i.test(data[name] as string) ||
isNaN(parseInt(data[name] as string, 10))
? data[name]
: parseInt(data[name] as string, 10);
}
}

Expand Down

0 comments on commit 7cfb4d3

Please sign in to comment.