From 3b5111635ffa99159b507565317565f16c61aba4 Mon Sep 17 00:00:00 2001 From: Abhi Beckert Date: Sun, 6 Sep 2015 10:34:39 +1000 Subject: [PATCH] Fix duplicate 'empty' elements Closes #128 --- jquery.nestable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.nestable.js b/jquery.nestable.js index 7323fb4..0069162 100644 --- a/jquery.nestable.js +++ b/jquery.nestable.js @@ -446,7 +446,7 @@ if (!parent.children().length) { this.unsetParent(parent.parent()); } - if (!this.dragRootEl.find(opt.itemNodeName).length) { + if (!this.dragRootEl.find(opt.itemNodeName).length && !this.dragRootEl.find('.' + opt.emptyClass).length) { this.dragRootEl.append('
'); } // parent root list has changed