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

This commit is contained in:
Johannes Rieken 2021-07-05 10:47:24 +02:00
parent 4a6402745f
commit f8cf8f39be
No known key found for this signature in database
GPG key ID: 96634B5AF12F8798

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;
}