Permalink
Browse files

Merge pull request #17 from antonkovalyov/master

Fixed a bug with IE8 blowing up when .apply is called with the explicit second parameter set to undefined
  • Loading branch information...
2 parents 39bb1e2 + 172e44d commit af12f3e0d88c803da235c9446f10f9a2fb74d815 @fat committed Jul 13, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/bean.js
View
@@ -184,13 +184,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 || []);
}
}
}

0 comments on commit af12f3e

Please sign in to comment.