Skip to content

Commit a09d6c0

Browse files
authored
Merge pull request #44 from philipwalton/bug-fixes
Fix JavaScript errors in the demo (closes #43)
2 parents 02c93b5 + c0520d1 commit a09d6c0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

google-analytics-chart.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@
223223

224224
ready: function() {
225225
this._boundResponseHandler = this.handleResponse.bind(this);
226+
227+
this.$.chart.options = this.$.chart.options || {};
226228
merge(this.$.chart.options, getChartOptions(this.type), this.options);
227229
},
228230

google-analytics-dashboard.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
},
8080

8181
ready: function() {
82-
this.updateChildren();
82+
this.updateChildren();
8383
},
8484

8585
/**
@@ -91,6 +91,10 @@
9191
* @param {CustomEvent} event - The event with the query data.
9292
*/
9393
queryUpdated: function(event) {
94+
if (!this.query) {
95+
this.query = {};
96+
}
97+
9498
// Update `this.query` with the passed event data.
9599
Object.keys(event.detail).forEach(function(key) {
96100
this.query[key] = event.detail[key];

0 commit comments

Comments
 (0)