Skip to content

Commit

Permalink
Merge pull request #486 from thematters/feat/blockquote
Browse files Browse the repository at this point in the history
fix: skip if $grandparent is nullish
  • Loading branch information
robertu7 authored Jun 9, 2024
2 parents dc6ce48 + 170e966 commit 360b57b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@matters/matters-editor",
"version": "0.2.5-alpha.3",
"version": "0.2.5-alpha.4",
"description": "Editor for matters.news",
"author": "https://github.com/thematters",
"homepage": "https://github.com/thematters/matters-editor",
Expand Down
2 changes: 1 addition & 1 deletion src/editors/extensions/blockquote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const Blockquote = Node.create<BlockquoteOptions>({
// Skip if not in a blockquote
const $anchor = transaction.selection.$anchor
const $grandParent = $anchor.node($anchor.depth - 1)
const isInBlockquote = $grandParent.type.name === this.name
const isInBlockquote = $grandParent?.type.name === this.name
if (!isInBlockquote) {
return true
}
Expand Down

0 comments on commit 360b57b

Please sign in to comment.