From ddb9a4bf186b766477f21102dae6eb1299ea425a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 17 Jun 2021 17:34:06 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20fix=20a=20bug=20where=20setting=20text?= =?UTF-8?q?=20align=20isn=E2=80=99t=20working=20when=20heading=20extension?= =?UTF-8?q?=20is=20not=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/extension-text-align/src/text-align.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/extension-text-align/src/text-align.ts b/packages/extension-text-align/src/text-align.ts index d18202fd..93730520 100644 --- a/packages/extension-text-align/src/text-align.ts +++ b/packages/extension-text-align/src/text-align.ts @@ -60,10 +60,10 @@ export const TextAlign = Extension.create({ return false } - return this.options.types.every(type => commands.updateAttributes(type, { textAlign: alignment })) + return this.options.types.some(type => commands.updateAttributes(type, { textAlign: alignment })) }, unsetTextAlign: () => ({ commands }) => { - return this.options.types.every(type => commands.resetAttributes(type, 'textAlign')) + return this.options.types.some(type => commands.resetAttributes(type, 'textAlign')) }, } },