diff --git a/src/plugins/jquery.flot.pie.js b/src/plugins/jquery.flot.pie.js index 0395fbd..ac0cbcf 100644 --- a/src/plugins/jquery.flot.pie.js +++ b/src/plugins/jquery.flot.pie.js @@ -254,6 +254,8 @@ More detail and specific examples can be found in the included HTML file. function draw(plot, newCtx) { + /* global console */ + if (!target) { return; // if no series were passed } @@ -327,7 +329,9 @@ More detail and specific examples can be found in the included HTML file. if (attempts >= REDRAW_ATTEMPTS) { clear(); - target.prepend("
Could not draw pie with labels contained inside canvas
"); + if ( typeof console === "object" && typeof console.warn === "function" ) { + console.warn("Could not draw pie with labels contained inside canvas"); + } } if (plot.setSeries && plot.insertLegend) {