FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add isFunction helper method, as per Adriaan's suggestion. · binarweb/scripts@26b2c75 · GitHub

Repository navigation

Commit 26b2c75

Browse files
authored andcommitted
Add isFunction helper method, as per Adriaan's suggestion.
1 parent e02720e commit 26b2c75

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/default.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@
115115
}
116116
};
117117

118+
var isFunction = function(func) {
119+
return typeof func === "function";
120+
};
121+
118122
var assign = function () {
119123
var to = {};
120124
var arg = arguments;
@@ -607,7 +611,7 @@
607611
var arg = arguments;
608612
var rv = orig.apply(this, arg);
609613
var event;
610-
if (typeof Event == "function") {
614+
if (isFunction(Event)) {
611615
event = new Event(type);
612616
} else {
613617
// Fix for IE

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL