core: prevent calling plugins if the node doesn't exist in DOM anymore (has been removed by the user) (fixes #4087)

This commit is contained in:
Paul Bakaus 2009-02-10 09:14:59 +00:00
parent 8ccbc0ac55
commit 4e61b952f3

View File

@ -27,7 +27,7 @@ $.ui = {
},
call: function(instance, name, args) {
var set = instance.plugins[name];
if(!set) { return; }
if(!set || !instance.element[0].parentNode) { return; }
for (var i = 0; i < set.length; i++) {
if (instance.options[set[i][0]]) {