Swallow error on context view when disposing children (#1663)

* swallow error on context view  when disposing children

* fix edit comment
This commit is contained in:
Anthony Dresser
2018-06-19 12:22:25 -07:00
committed by GitHub
parent 520cfb780a
commit e69158d9b2

View File

@@ -397,8 +397,16 @@ export class SelectBoxList implements ISelectBoxDelegate, IDelegate<ISelectOptio
container.appendChild(this.selectDropDownContainer);
this.layoutSelectDropDown();
// {{SQL CARBON EDIT}}
return {
dispose: () => container.removeChild(this.selectDropDownContainer) // remove to take out the CSS rules we add
dispose: () => {
try {
container.removeChild(this.selectDropDownContainer); // remove to take out the CSS rules we add
} catch(e) {
// if this fails it means it is already removed
}
}
};
}