Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wwilsman committed Feb 25, 2015
1 parent fdffccc commit 52f129c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions dropkick.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var

// The Dropkick Object
Dropkick = function( sel, opts ) {
var i, l;
var i, dk;

// Safety if `Dropkick` is called without `new`
if ( this === window ) {
Expand All @@ -34,9 +34,11 @@ var

// Check if select has already been DK'd and return the DK Object
for ( i = 0; i < Dropkick.uid; i++) {
if ( Dropkick.cache[ i ].data.select === sel ) {
_.extend( Dropkick.cache[ i ].data.settings, opts );
return Dropkick.cache[ i ];
dk = Dropkick.cache[ i ];

if ( dk instanceof Dropkick && dk.data.select === sel ) {
_.extend( dk.data.settings, opts );
return dk;
}
}

Expand Down
Loading

0 comments on commit 52f129c

Please sign in to comment.