jQuery: The Write Less, Do More JavaScript Library

Changeset 4440

Show
Ignore:
Timestamp:
01/14/08 18:46:44 (7 months ago)
Author:
jeresig
Message:

Added a fix for bug #2140. Opera doesn't like concating null or undefined values.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/event.js

    r4330 r4440  
    208208            if ( extra && jQuery.isFunction( extra ) ) { 
    209209                // call the extra function and tack the current return value on the end for possible inspection 
    210                 ret = extra.apply( elem, data.concat( val ) ); 
     210                ret = extra.apply( elem, val == null ? data : data.concat( val ) ); 
    211211                // if anything is returned, give it precedence and have it overwrite the previous value 
    212212                if (ret !== undefined)