desandro/imagesloaded — Issue #19: typeof test on callback
Author: whitneyit
Created: 2012-02-02 02:58:40+00:00
State: open

When using the plugin in the following method;

var dfd = $('#my-container').imagesLoaded();

There is an error on line 49 when no "callback" is supplied.

May I recommend modifying the code to the following

if ( typeof callback === 'function' ) {
callback.call( $this, $images, $proper, $broken );
}