Skip to content

Commit 1170ddc

Browse files
committed
Merge pull request #7 from greggroth/undefined-legend
Guard against undefined legend
2 parents 936a296 + a8df0de commit 1170ddc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/angular-dygraphs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ angular.module("angular-dygraphs", [
104104
return;
105105
console.log(event, x, points, row);
106106
var html = "<table><tr><th colspan='2'>";
107-
if (typeof moment === "function") {
107+
if (typeof moment === "function" && scope.legend !== undefined) {
108108
html += moment(x).format(scope.legend.dateFormat);
109109
}
110110
else {

0 commit comments

Comments
 (0)