Skip to content

Commit

Permalink
fix awareness check
Browse files Browse the repository at this point in the history
this.awareness will never be null:
- if passed undefined or null, it will never be set on line 197, thus stay undefined instead of null
  • Loading branch information
YousefED committed May 9, 2021
1 parent 2243c71 commit 099cf3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/y-monaco.js
Expand Up @@ -202,7 +202,7 @@ export class MonacoBinding {
this._monacoChangeHandler.dispose()
this.ytext.unobserve(this._ytextObserver)
this.doc.off('beforeAllTransactions', this._beforeTransaction)
if (this.awareness !== null) {
if (this.awareness) {
this.awareness.off('change', this._rerenderDecorations)
}
}
Expand Down

0 comments on commit 099cf3a

Please sign in to comment.