2626
2727namespace BootstrapComponents ;
2828
29- use \ConfigException ;
3029use \Html ;
3130use \MediaWiki \MediaWikiServices ;
3231use \ParserOutput ;
@@ -158,7 +157,7 @@ public function areImageModalsSuppressed() {
158157 *
159158 * @return string
160159 */
161- public function getContentForLaterInjection ( \ParserOutput $ parserOutput ) {
160+ public function getContentForLaterInjection ( \ParserOutput $ parserOutput ): string {
162161 $ deferredContent = $ parserOutput ->getExtensionData ( self ::EXTENSION_DATA_DEFERRED_CONTENT_KEY );
163162
164163 if ( empty ( $ deferredContent ) || !is_array ( $ deferredContent ) ) {
@@ -210,14 +209,11 @@ public function loadBootstrapModules() {
210209 if ( is_a ( $ parserOutput , ParserOutput::class ) ) {
211210 // Q: when do we expect \Parser->getOutput() not to be a \ParserOutput? A: During tests.
212211 $ parserOutput ->setExtensionData ( 'bsc_load_modules ' , true );
213- if ( $ this ->vectorSkinInUse () ) {
214- $ parserOutput ->addModules ( [ 'ext.bootstrapComponents.vector-fix ' ] );
215- }
216212 }
217213 }
218214
219215 /**
220- * Formats a text as error text so it can be added to the output.
216+ * Formats a text as error text, so it can be added to the output.
221217 *
222218 * @param string $errorMessageName
223219 *
@@ -241,7 +237,7 @@ public function renderErrorMessage( $errorMessageName ) {
241237 * @return bool
242238 */
243239 public function vectorSkinInUse () {
244- return strtolower ( $ this ->getNameOfActiveSkin () ) == 'vector ' ;
240+ return in_array ( strtolower ( $ this ->getNameOfActiveSkin () ), [ 'vector ' , ' vector-2022 ' ] ) ;
245241 }
246242
247243 /**
0 commit comments