Skip to content

Commit

Permalink
chore(LinkBubble): remove superfluous checks
Browse files Browse the repository at this point in the history
`active` object from prosemirror state and oldState are never similar
anyway.

Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Jun 25, 2024
1 parent 01d8a12 commit 337b9dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/plugins/LinkBubblePluginView.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ class LinkBubblePluginView {
if (view.composing) {
return
}
if (active === oldActive) {
return
}
this.createTooltip()
if (active?.mark) {
this.updateTooltip(view, active)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function linkBubble(options) {
init: () => ({ active: null }),
apply: (tr, cur) => {
const meta = tr.getMeta(linkBubbleKey)
if (meta && meta.active !== cur.active) {
if (meta) {
return { ...cur, active: meta.active }
} else {
return cur
Expand Down

0 comments on commit 337b9dc

Please sign in to comment.