mirror of
https://github.com/fantasticit/think.git
synced 2026-09-01 15:10:55 +08:00
fix jserror
This commit is contained in:
@@ -28,10 +28,10 @@ export const TableBubbleMenu = ({ editor }) => {
|
||||
const getRenderContainer = useCallback((node) => {
|
||||
let container = node;
|
||||
// 文本节点
|
||||
if (!container.tag) {
|
||||
if (container && !container.tag) {
|
||||
container = node.parentElement;
|
||||
}
|
||||
while (container.tagName !== 'TABLE') {
|
||||
while (container && container.tagName !== 'TABLE') {
|
||||
container = container.parentElement;
|
||||
}
|
||||
return container.parentElement;
|
||||
|
||||
Reference in New Issue
Block a user