mirror of https://github.com/fantasticit/think.git
fix jserror
This commit is contained in:
parent
4f8549b8ba
commit
d5a1d824a9
|
@ -28,10 +28,10 @@ export const TableBubbleMenu = ({ editor }) => {
|
||||||
const getRenderContainer = useCallback((node) => {
|
const getRenderContainer = useCallback((node) => {
|
||||||
let container = node;
|
let container = node;
|
||||||
// 文本节点
|
// 文本节点
|
||||||
if (!container.tag) {
|
if (container && !container.tag) {
|
||||||
container = node.parentElement;
|
container = node.parentElement;
|
||||||
}
|
}
|
||||||
while (container.tagName !== 'TABLE') {
|
while (container && container.tagName !== 'TABLE') {
|
||||||
container = container.parentElement;
|
container = container.parentElement;
|
||||||
}
|
}
|
||||||
return container.parentElement;
|
return container.parentElement;
|
||||||
|
|
Loading…
Reference in New Issue