Skip to content
Permalink
Browse files

use $.isFunction instead of checking the constructor

  • Loading branch information...
Paul Bakaus
Paul Bakaus committed Sep 16, 2008
1 parent aed2981 commit dc31bc2f3e8e31788cb10b59ba8fe691863022d8
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/ui.droppable.js
@@ -18,7 +18,7 @@ $.widget("ui.droppable", {
_setData: function(key, value) {

if(key == 'accept') {
this.options.accept = value && value.constructor == Function ? value : function(d) {
this.options.accept = value && $.isFunction(value) ? value : function(d) {
return d.is(accept);
};
} else {
@@ -32,7 +32,7 @@ $.widget("ui.droppable", {
var o = this.options, accept = o.accept;
this.isover = 0; this.isout = 1;

this.options.accept = this.options.accept && this.options.accept.constructor == Function ? this.options.accept : function(d) {
this.options.accept = this.options.accept && $.isFunction(this.options.accept) ? this.options.accept : function(d) {
return d.is(accept);
};

0 comments on commit dc31bc2

Please sign in to comment.
You can’t perform that action at this time.