From 630d47792accdcd2db4b3d6723bef4763b465be4 Mon Sep 17 00:00:00 2001 From: Nicholas Ray Date: Thu, 20 Apr 2023 13:44:36 -0600 Subject: [PATCH] Fix InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList' Bug: T335149 Change-Id: I9dad78af21ca7ee272a3661f5869e6337909dc05 --- resources/skins.vector.js/echo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/skins.vector.js/echo.js b/resources/skins.vector.js/echo.js index 8fc973582..f125d0e76 100644 --- a/resources/skins.vector.js/echo.js +++ b/resources/skins.vector.js/echo.js @@ -11,16 +11,16 @@ function init() { const element = badge.$element[ 0 ]; element.classList.add( 'mw-list-item' ); - const iconButtonClasses = 'mw-ui-button mw-ui-quiet mw-ui-icon mw-ui-icon-element '; + const iconButtonClasses = [ 'mw-ui-button', 'mw-ui-quiet', 'mw-ui-icon', 'mw-ui-icon-element' ]; if ( element.id === 'pt-notifications-alert' ) { const anchor = element.querySelector( 'a' ); - anchor.classList.add( iconButtonClasses + 'mw-ui-icon-bell' ); + anchor.classList.add( ...iconButtonClasses, 'mw-ui-icon-bell' ); anchor.classList.remove( 'oo-ui-icon-bell' ); } if ( element.id === 'pt-notifications-notice' ) { const anchor = element.querySelector( 'a' ); - anchor.classList.add( iconButtonClasses + 'mw-ui-icon-tray' ); + anchor.classList.add( ...iconButtonClasses, 'mw-ui-icon-tray' ); anchor.classList.remove( 'oo-ui-icon-tray' ); } } );