add deep merge
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// @ts-nocheck
|
||||
import {
|
||||
DOMOutputSpec,
|
||||
NodeSpec,
|
||||
@@ -7,6 +8,7 @@ import {
|
||||
import { Plugin, Transaction } from 'prosemirror-state'
|
||||
import { InputRule } from 'prosemirror-inputrules'
|
||||
import { ExtensionConfig } from './Extension'
|
||||
import mergeDeep from './utilities/mergeDeep'
|
||||
import { Attributes, NodeViewRenderer, Overwrite } from './types'
|
||||
import { Editor } from './Editor'
|
||||
|
||||
@@ -305,10 +307,7 @@ export class Node<Options = any, Commands = {}> {
|
||||
}
|
||||
|
||||
#configure = (options: Partial<Options>) => {
|
||||
this.options = {
|
||||
...this.config.defaultOptions,
|
||||
...options,
|
||||
}
|
||||
this.options = mergeDeep(this.config.defaultOptions, options) as Options
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user