toDisposable should be once'd, fyi @hediet, @alexdima

This commit is contained in:
Johannes Rieken
2021-07-05 10:47:47 +02:00
parent 4a6402745f
commit f8cf8f39be
+2 -2
View File
@@ -122,10 +122,10 @@ export function combinedDisposable(...disposables: IDisposable[]): IDisposable {
export function toDisposable(fn: () => void): IDisposable {
const self = trackDisposable({
dispose: () => {
dispose: once(() => {
markTracked(self);
fn();
}
})
});
return self;
}