Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(editor-core): scrollController not exist in Board mode

alt0329263d04933
diff --git a/libs/components/editor-core/src/editor/scroll/scroll.ts b/libs/components/editor-core/src/editor/scroll/scroll.ts
index efe65e50c0..81f66578e4 100644
--- a/libs/components/editor-core/src/editor/scroll/scroll.ts
+++ b/libs/components/editor-core/src/editor/scroll/scroll.ts
@@ -297,10 +297,10 @@ export class ScrollManager {
}
public lock() {
- this._scrollController.lockScroll();
+ this._scrollController?.lockScroll();
}
public unLock() {
- this._scrollController.unLockScroll();
+ this._scrollController?.unLockScroll();
}
}