We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 781f2e7 commit 7d5355cCopy full SHA for 7d5355c
src/data/coverage-summary-1.json src/data/coverage-summary.json
src/templates/App.js
@@ -28,7 +28,10 @@ class App extends Component {
28
// Checks if the filename has changed at the endpoint
29
const newFileHash = (file) => {
30
const ogFile = localStorage.getItem('fileName');
31
- const ogArray = localStorage.getItem('statementTotals');
+ // Check the array has at least 2 values to show on LineChart
32
+ const ogArray = localStorage.getItem('statementTotals')
33
+ ? JSON.parse(localStorage.getItem('statementTotals')).length >= 2
34
+ : false;
35
// Make sure both localStorage items exist
36
if (ogFile && ogArray) {
37
localStorage.setItem('fileName', file);
0 commit comments