From 172e44d2c03a494b3671920143bd75f7be659f72 Mon Sep 17 00:00:00 2001 From: Anton Kovalyov Date: Mon, 11 Jul 2011 16:57:42 -0700 Subject: [PATCH] Fixed a bug with IE8 blowing up when .apply is called with the explicit second parameter set to undefined --- src/bean.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bean.js b/src/bean.js index 24c4398..dc8af61 100644 --- a/src/bean.js +++ b/src/bean.js @@ -175,13 +175,13 @@ if (isNamespace) { isNamespace = isNamespace.split('.'); for (k = isNamespace.length; k--;) { - handlers && handlers[isNamespace[k]] && handlers[isNamespace[k]].apply(element, args); + handlers && handlers[isNamespace[k]] && handlers[isNamespace[k]].apply(element, args || []); } } else if (!args && element[eventSupport]) { fireListener(isNative, type, element); } else { for (k in handlers) { - handlers.hasOwnProperty(k) && handlers[k].apply(element, args); + handlers.hasOwnProperty(k) && handlers[k].apply(element, args || []); } } }