Fix:修复自定义节点方法返回null时报错的问题
This commit is contained in:
parent
0107eb79c2
commit
2678e429aa
@ -179,10 +179,12 @@ class Node {
|
|||||||
let { isUseCustomNodeContent, customCreateNodeContent } = this.mindMap.opt
|
let { isUseCustomNodeContent, customCreateNodeContent } = this.mindMap.opt
|
||||||
if (isUseCustomNodeContent && customCreateNodeContent) {
|
if (isUseCustomNodeContent && customCreateNodeContent) {
|
||||||
this._customNodeContent = customCreateNodeContent(this)
|
this._customNodeContent = customCreateNodeContent(this)
|
||||||
this._customNodeContent.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml')
|
|
||||||
}
|
}
|
||||||
// 如果没有返回内容,那么还是使用内置的节点内容
|
// 如果没有返回内容,那么还是使用内置的节点内容
|
||||||
if (this._customNodeContent) return
|
if (this._customNodeContent) {
|
||||||
|
this._customNodeContent.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml')
|
||||||
|
return
|
||||||
|
}
|
||||||
this._imgData = this.createImgNode()
|
this._imgData = this.createImgNode()
|
||||||
this._iconData = this.createIconNode()
|
this._iconData = this.createIconNode()
|
||||||
this._textData = this.createTextNode()
|
this._textData = this.createTextNode()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user