mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-25 09:06:21 +01:00
toDisposable should be once'd, fyi @hediet, @alexdima
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user