diff --git a/src/js/bootstrap-treeview.js b/src/js/bootstrap-treeview.js index 820a1f941..3741af717 100644 --- a/src/js/bootstrap-treeview.js +++ b/src/js/bootstrap-treeview.js @@ -1230,7 +1230,9 @@ targetNodes.splice(node.index, 1, newNode); // remove old node from DOM - this._removeNodeEl(node); + if (node.$el !== newNode.$el) { + this._removeNodeEl(node); + } // initialize new state and render changes this._setInitialStates({nodes: this._tree}, 0)