From 5fe3646ab02953eaf42380df45405ea135dc04f7 Mon Sep 17 00:00:00 2001 From: Lee Willis Date: Tue, 23 Apr 2013 11:02:53 +0100 Subject: [PATCH] Remove $.isNumeric() for compat with jQuery < 1.7. Fixes #1026 --- jquery.flot.pie.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jquery.flot.pie.js b/jquery.flot.pie.js index ebff1a3..80c1fd6 100644 --- a/jquery.flot.pie.js +++ b/jquery.flot.pie.js @@ -181,12 +181,13 @@ More detail and specific examples can be found in the included HTML file. // that the user may have stored in higher indexes. if ($.isArray(value)) { - if ($.isNumeric(value[1])) { + // Equivalent to $.isNumeric() but compatible with jQuery < 1.7 + if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) { value[1] = +value[1]; } else { value[1] = 0; } - } else if ($.isNumeric(value)) { + } else if (!isNaN(parseFloat(value)) && isFinite(value)) { value = [1, +value]; } else { value = [1, 0];