This commit is contained in:
Joao Moreno
2016-01-06 12:59:04 +01:00
committed by Johannes Rieken
parent ea48288c20
commit 2a6a00aafd

View File

@@ -278,7 +278,12 @@ export class ViewItem implements IViewItem {
if (afterElement === null) {
container.appendChild(this.element);
} else {
container.insertBefore(this.element, afterElement);
try {
container.insertBefore(this.element, afterElement);
} catch (e) {
console.warn('Failed to locate previous tree element');
container.appendChild(this.element);
}
}
this.render();