From 099cf3a4cf3bbebaf7bdc5bdaa86fb964610cb31 Mon Sep 17 00:00:00 2001 From: Yousef Date: Sun, 9 May 2021 18:59:04 +0200 Subject: [PATCH] fix awareness check 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 --- src/y-monaco.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/y-monaco.js b/src/y-monaco.js index 182786f..f0c397e 100644 --- a/src/y-monaco.js +++ b/src/y-monaco.js @@ -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) } }