Skip to content

Commit 09497c9

Browse files
authored
Merge pull request #44 from gormanb/master
Check that options.zoom exists before reading options.zoom.drag in beforeInit
2 parents d7fb264 + 32bb762 commit 09497c9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Chart.Zoom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ var zoomPlugin = {
302302
var options = chartInstance.options;
303303
var panThreshold = helpers.getValueOrDefault(options.pan ? options.pan.threshold : undefined, zoomNS.defaults.pan.threshold);
304304

305-
if (options.zoom.drag) {
305+
if (options.zoom && options.zoom.drag) {
306306
// Only want to zoom horizontal axis
307307
options.zoom.mode = 'x';
308308

Chart.Zoom.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/chart.zoom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ var zoomPlugin = {
290290
var options = chartInstance.options;
291291
var panThreshold = helpers.getValueOrDefault(options.pan ? options.pan.threshold : undefined, zoomNS.defaults.pan.threshold);
292292

293-
if (options.zoom.drag) {
293+
if (options.zoom && options.zoom.drag) {
294294
// Only want to zoom horizontal axis
295295
options.zoom.mode = 'x';
296296

0 commit comments

Comments
 (0)