Skip to content

Commit

Permalink
Fix javascript error (@see rlerdorf#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
steffenmaechtel committed Nov 17, 2018
1 parent 20e4f87 commit 6d4d55d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions opcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,13 @@ function set_text(t) {

function change() {
// Filter out any zero values to see if there is anything left
var remove_zero_values = dataset[this.value].filter(function(value) {
return value > 0;
});
if (dataset[this.value] !== undefined) {
var remove_zero_values = dataset[this.value].filter(function(value) {
return value > 0;
});
} else {
var remove_zero_values = [];
}

// Skip if the value is undefined for some reason
if (typeof dataset[this.value] !== 'undefined' && remove_zero_values.length > 0) {
Expand Down

0 comments on commit 6d4d55d

Please sign in to comment.