Skip to content

Commit 2e93f07

Browse files
committed
fix: do not null set editorSubscriptions
1 parent 3ae024d commit 2e93f07

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
@@ -28,7 +28,7 @@ export class SignatureHelpManager {
2828
/**
2929
* holds a reference to all disposable items for the current watched Atom text editor
3030
*/
31-
editorSubscriptions: CompositeDisposable | null = null
31+
editorSubscriptions: CompositeDisposable = new CompositeDisposable()
3232
/**
3333
* holds a reference to all disposable items for the current signature help
3434
*/
@@ -78,10 +78,7 @@ export class SignatureHelpManager {
7878
dispose() {
7979
this.signatureHelpDisposables.dispose()
8080

81-
if (this.editorSubscriptions) {
82-
this.editorSubscriptions.dispose()
83-
}
84-
this.editorSubscriptions = null
81+
this.editorSubscriptions.dispose()
8582

8683
this.subscriptions.dispose()
8784
}
@@ -139,10 +136,7 @@ export class SignatureHelpManager {
139136
if (editor === this.editor) {
140137
return
141138
}
142-
if (this.editorSubscriptions) {
143-
this.editorSubscriptions.dispose()
144-
}
145-
this.editorSubscriptions = null
139+
this.editorSubscriptions.dispose()
146140

147141
// Stop tracking editor + buffer
148142
this.unmountDataTip()

0 commit comments

Comments
 (0)