From afe12f1603292c3231854557674a926338b01f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 15 Apr 2021 23:14:47 +0200 Subject: [PATCH] fix attributes --- packages/core/src/ExtensionManager.ts | 3 +-- packages/core/src/helpers/getAttributesFromExtensions.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/core/src/ExtensionManager.ts b/packages/core/src/ExtensionManager.ts index 314bb7fab..4d129bf9b 100644 --- a/packages/core/src/ExtensionManager.ts +++ b/packages/core/src/ExtensionManager.ts @@ -250,8 +250,7 @@ export default class ExtensionManager { return Object.fromEntries(nodeExtensions .filter(extension => !!getExtensionField(extension, 'addNodeView')) .map(extension => { - const name = getExtensionField(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, diff --git a/packages/core/src/helpers/getAttributesFromExtensions.ts b/packages/core/src/helpers/getAttributesFromExtensions.ts index c70923e33..1c3ff0d4e 100644 --- a/packages/core/src/helpers/getAttributesFromExtensions.ts +++ b/packages/core/src/helpers/getAttributesFromExtensions.ts @@ -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,