From 70dc4fc29f7230a1ca31cc3814703b2d10be638a Mon Sep 17 00:00:00 2001 From: Himanshu Kapoor Date: Thu, 31 Mar 2022 22:18:40 +0200 Subject: [PATCH] chore: lint fixes --- packages/extension-bubble-menu/src/bubble-menu-plugin.ts | 4 ++-- packages/extension-floating-menu/src/floating-menu-plugin.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/extension-bubble-menu/src/bubble-menu-plugin.ts b/packages/extension-bubble-menu/src/bubble-menu-plugin.ts index ec0d557f..14872a03 100644 --- a/packages/extension-bubble-menu/src/bubble-menu-plugin.ts +++ b/packages/extension-bubble-menu/src/bubble-menu-plugin.ts @@ -180,7 +180,7 @@ export class BubbleMenuView { } this.tippy?.setProps({ - getReferenceClientRect: this.tippyOptions.getReferenceClientRect || () => { + getReferenceClientRect: this.tippyOptions?.getReferenceClientRect || (() => { if (isNodeSelection(state.selection)) { const node = view.nodeDOM(from) as HTMLElement @@ -190,7 +190,7 @@ export class BubbleMenuView { } return posToDOMRect(view, from, to) - }, + }), }) this.show() diff --git a/packages/extension-floating-menu/src/floating-menu-plugin.ts b/packages/extension-floating-menu/src/floating-menu-plugin.ts index caffdffc..1440492e 100644 --- a/packages/extension-floating-menu/src/floating-menu-plugin.ts +++ b/packages/extension-floating-menu/src/floating-menu-plugin.ts @@ -156,7 +156,7 @@ export class FloatingMenuView { } this.tippy?.setProps({ - getReferenceClientRect: this.tippyOptions.getReferenceClientRect || () => posToDOMRect(view, from, to), + getReferenceClientRect: this.tippyOptions?.getReferenceClientRect || (() => posToDOMRect(view, from, to)), }) this.show()