mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 18:37:43 +08:00
只确保有效对象
This commit is contained in:
parent
6280d1b151
commit
685820e133
@ -879,14 +879,10 @@ class Render {
|
||||
...(appointData || {})
|
||||
}
|
||||
if ( typeof this.mindMap.opt.customNewNodeParams === 'function'){
|
||||
let customParams = this.mindMap.opt.customNewNodeParams()
|
||||
if (customParams && typeof customParams !== 'object') {
|
||||
console.error('customNewNodeParams return value must be object')
|
||||
customParams = {}
|
||||
}
|
||||
const customParams = this.mindMap.opt.customNewNodeParams()
|
||||
nodeData = {
|
||||
...nodeData,
|
||||
...customParams
|
||||
...customParams || {}
|
||||
}
|
||||
}
|
||||
const newNode = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user