From dc31bc2f3e8e31788cb10b59ba8fe691863022d8 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Tue, 16 Sep 2008 09:03:28 +0000 Subject: use $.isFunction instead of checking the constructor --- ui/ui.droppable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js index ab95bb334..839ac0311 100644 --- a/ui/ui.droppable.js +++ b/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); }; -- cgit v1.2.3