mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
添加异常处理
This commit is contained in:
parent
5f4ed97dc1
commit
6280d1b151
@ -879,10 +879,14 @@ class Render {
|
||||
...(appointData || {})
|
||||
}
|
||||
if ( typeof this.mindMap.opt.customNewNodeParams === 'function'){
|
||||
const return_value = this.mindMap.opt.customNewNodeParams()
|
||||
let customParams = this.mindMap.opt.customNewNodeParams()
|
||||
if (customParams && typeof customParams !== 'object') {
|
||||
console.error('customNewNodeParams return value must be object')
|
||||
customParams = {}
|
||||
}
|
||||
nodeData = {
|
||||
...nodeData,
|
||||
...return_value
|
||||
...customParams
|
||||
}
|
||||
}
|
||||
const newNode = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user