Skip to content

Commit 3ae024d

Browse files
committed
fix: do not null set signatureHelpDisposables
1 parent ff548d8 commit 3ae024d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/signature-help-manager.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class SignatureHelpManager {
3232
/**
3333
* holds a reference to all disposable items for the current signature help
3434
*/
35-
signatureHelpDisposables: CompositeDisposable | null = null
35+
signatureHelpDisposables: CompositeDisposable = new CompositeDisposable()
3636
/**
3737
* config flag denoting if the signature help should be shown during typing automatically
3838
*/
@@ -76,10 +76,7 @@ export class SignatureHelpManager {
7676
* dispose function to clean up any disposable references used
7777
*/
7878
dispose() {
79-
if (this.signatureHelpDisposables) {
80-
this.signatureHelpDisposables.dispose()
81-
}
82-
this.signatureHelpDisposables = null
79+
this.signatureHelpDisposables.dispose()
8380

8481
if (this.editorSubscriptions) {
8582
this.editorSubscriptions.dispose()
@@ -331,9 +328,6 @@ export class SignatureHelpManager {
331328
* unmounts / hides the most recent data tip view component
332329
*/
333330
unmountDataTip() {
334-
if (this.signatureHelpDisposables) {
335-
this.signatureHelpDisposables.dispose()
336-
}
337-
this.signatureHelpDisposables = null
331+
this.signatureHelpDisposables.dispose()
338332
}
339333
}

0 commit comments

Comments
 (0)