Skip to content

Commit 6112618

Browse files
authored
Check if Chart defined before displaying Tooltip (#61)
* Check if Chart defined before displaying Tooltip * Remove unused imports * Update CHANGELOG.md
1 parent bf7c298 commit 6112618

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
- Add default Color Mode Id for older releases (7.2.X) #49
1717
- Fix Latency below zero calculation #56
18+
- "Cannot read property 'Tooltip' of undefined" for Latency Panel in the upcoming release #60
1819

1920
## v1.1.0 (2021-02-07)
2021

src/redis-gears-panel/components/code-editor/code-editor.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from 'react';
21
import { shallow } from 'enzyme';
2+
import React from 'react';
33
import Editor from '@monaco-editor/react';
44
import { UnthemedCodeEditor } from './code-editor';
55

src/redis-latency-panel/components/redis-latency-panel-graph/redis-latency-panel-graph.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export class RedisLatencyPanelGraph extends PureComponent<Props, State> {
210210
hideZero={options?.hideZero}
211211
showLines
212212
>
213-
<Chart.Tooltip mode="multi"></Chart.Tooltip>
213+
{Chart && <Chart.Tooltip mode="multi"></Chart.Tooltip>}
214214
</GraphWithLegend>
215215
);
216216
}

0 commit comments

Comments
 (0)