Skip to content

Commit

Permalink
refactor: format class
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocs committed Dec 3, 2023
1 parent 945489e commit 0481fcf
Show file tree
Hide file tree
Showing 24 changed files with 1,849 additions and 1,805 deletions.
8 changes: 4 additions & 4 deletions lib/block/base/content/index.ts → lib/block/base/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class Content extends TreeNode {
muya,
newNodeState
);
this.scrollPage.append(newNode, "user");
this.scrollPage?.append(newNode, "user");
cursorBlock = newNode.children.head;
}
offset = adjustOffset(0, cursorBlock, event);
Expand All @@ -223,7 +223,7 @@ class Content extends TreeNode {
*/
getCursor() {
const selection = this.selection.getSelection();
if (!selection) {
if (selection == null) {
return null;
}

Expand Down Expand Up @@ -519,11 +519,11 @@ class Content extends TreeNode {
};

blurHandler() {
this.scrollPage.handleBlurFromContent(this);
this.scrollPage?.handleBlurFromContent(this);
}

focusHandler() {
this.scrollPage.handleFocusFromContent(this);
this.scrollPage?.handleFocusFromContent(this);
}

getAncestors() {
Expand Down
Loading

0 comments on commit 0481fcf

Please sign in to comment.