diff --git a/NEWS.txt b/NEWS.txt index 68ba514..2f9fb4e 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -58,6 +58,8 @@ Bug fixes - Prevent i from being declared global in extractRange (reported by Alexander Obukhov, issue 627). +- Throw errors in a more cross-browser-compatible manner (patch by + Eddie Kay) - Prevent pie slice outlines from being drawn when the stroke width is zero (reported by Chris Minett, issue 585) diff --git a/jquery.flot.js b/jquery.flot.js index 54807e4..81b4da2 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -716,7 +716,7 @@ canvasHeight = placeholder.height(); if (canvasWidth <= 0 || canvasHeight <= 0) - throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight; + throw new Error("Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight); } function resizeCanvas(c) {