From 1a7bb2330fba1e8b85d4ea2fa288b19c2d717b52 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Tue, 17 Nov 2020 17:03:57 +0300 Subject: [PATCH] Fixed #9497 - DOM Exception trigger with ButtonDirective afterViewInit --- src/app/components/dom/domhandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/dom/domhandler.ts b/src/app/components/dom/domhandler.ts index 717e52f09fb..e437b1519bc 100755 --- a/src/app/components/dom/domhandler.ts +++ b/src/app/components/dom/domhandler.ts @@ -26,7 +26,7 @@ export class DomHandler { public static addMultipleClasses(element: any, className: string): void { if (element.classList) { - let styles: string[] = className.split(' '); + let styles: string[] = className.trim().split(' '); for (let i = 0; i < styles.length; i++) { element.classList.add(styles[i]); }