aboutsummaryrefslogtreecommitdiffstats
path: root/src/callbacks.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/callbacks.js')
-rw-r--r--src/callbacks.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/callbacks.js b/src/callbacks.js
index 893f5760b..37acabcba 100644
--- a/src/callbacks.js
+++ b/src/callbacks.js
@@ -92,9 +92,10 @@ jQuery.Callbacks = function( options ) {
var start = list.length;
(function add( args ) {
jQuery.each( args, function( _, arg ) {
- if ( jQuery.isFunction( arg ) && ( !options.unique || !self.has( arg ) ) ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" && ( !options.unique || !self.has( arg ) ) ) {
list.push( arg );
- } else if ( arg && arg.length ) {
+ } else if ( arg && arg.length && type !== "string" ) {
// Inspect recursively
add( arg );
}