mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 16:25:00 +01:00
fix #1812
This commit is contained in:
committed by
Johannes Rieken
parent
ea48288c20
commit
2a6a00aafd
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user