toDisposable should be once'd, fyi @hediet, @alexdima
This commit is contained in:
parent
4a6402745f
commit
f8cf8f39be
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue