mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
fix #1812
This commit is contained in:
parent
ebcccd735f
commit
884e657d42
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue