Skip to content

Commit

Permalink
feat: [M3-5915] - safeguards
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly-akamai committed Apr 24, 2023
1 parent 6f3dcfd commit 11bb8e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/manager/src/components/LineGraph/LineGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ const LineGraph: React.FC<CombinedProps> = (props: CombinedProps) => {
const finalRowHeaders = rowHeaders ? rowHeaders : ['Max', 'Avg', 'Last'];
// the chartID is used to associate the chart with the table for accessibility purpose
// trying to use a more readable ariaLabel as the chartID, but if it's undefined, we'll generate a random ID
const chartID: string = ariaLabel
// TODO: update to use React.useId when we upgrade to React 18
const chartID: string | undefined = ariaLabel
? ariaLabel.replace(/\s+/g, '-').toLocaleLowerCase()
: crypto.randomUUID();
: crypto && crypto.randomUUID();
// is undefined on linode/summary
const plugins = [
{
Expand Down

0 comments on commit 11bb8e2

Please sign in to comment.