refactoring

This commit is contained in:
Philipp Kühn
2021-10-12 11:38:01 +02:00
parent e9465ec0f6
commit 2d0e6d02d1
2 changed files with 6 additions and 2 deletions

View File

@@ -11,7 +11,9 @@ export const BubbleMenu: React.FC<BubbleMenuProps> = props => {
const element = useRef<HTMLDivElement>(null) const element = useRef<HTMLDivElement>(null)
useEffect(() => { useEffect(() => {
if (!element.current) return if (!element.current) {
return
}
const { const {
pluginKey = 'bubbleMenu', pluginKey = 'bubbleMenu',

View File

@@ -11,7 +11,9 @@ export const FloatingMenu: React.FC<FloatingMenuProps> = props => {
const element = useRef<HTMLDivElement>(null) const element = useRef<HTMLDivElement>(null)
useEffect(() => { useEffect(() => {
if (!element.current) return if (!element.current) {
return
}
const { const {
pluginKey = 'floatingMenu', pluginKey = 'floatingMenu',