From 9aed0910fc358011b3070f1eba54cd24bdb38973 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 23 May 2014 05:39:41 -0400 Subject: [PATCH] feature(polyfill) add isArray --- lib/client/polyfill.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/client/polyfill.js b/lib/client/polyfill.js index 535022d1..4a5951ee 100644 --- a/lib/client/polyfill.js +++ b/lib/client/polyfill.js @@ -47,6 +47,14 @@ var Util, DOM, jQuery; return fBound; }; + if (!Array.isArray) + Array.isArray = function(arr) { + var type = Util.getType(arr), + is = type === 'array'; + + return is; + }; + /* * typeof callback === "function" should not be used, * as older browsers may report objects to be a function,