fix attributes

This commit is contained in:
Philipp Kühn 2021-04-15 23:14:47 +02:00
parent 08974c6332
commit afe12f1603
2 changed files with 2 additions and 3 deletions

View File

@ -250,8 +250,7 @@ export default class ExtensionManager {
return Object.fromEntries(nodeExtensions
.filter(extension => !!getExtensionField(extension, 'addNodeView'))
.map(extension => {
const name = getExtensionField<NodeConfig['name']>(extension, 'name')
const extensionAttributes = this.attributes.filter(attribute => attribute.type === name)
const extensionAttributes = this.attributes.filter(attribute => attribute.type === extension.name)
const context = {
options: extension.options,
editor,

View File

@ -84,7 +84,7 @@ export default function getAttributesFromExtensions(extensions: Extensions): Ext
.entries(attributes)
.forEach(([name, attribute]) => {
extensionAttributes.push({
type: getExtensionField(extension, 'name'),
type: extension.name,
name,
attribute: {
...defaultAttribute,