Don't add Vector-specific <body> classes when not using Vector

Hooks are global, unlike the old Skin addToBodyAttributes() method, which was per-skin.

Follow-up to a04fc71f30

Change-Id: Ic8a581256c4775ba45b2c5188d678751ba9c7023
(cherry picked from commit 3ea7bec6db)
This commit is contained in:
Jack Phoenix 2020-08-01 21:05:57 +03:00
parent 2ac57c85ea
commit a57b2b67b2
1 changed files with 4 additions and 0 deletions

View File

@ -210,6 +210,10 @@ class Hooks {
* @param string[] &$bodyAttrs
*/
public static function onOutputPageBodyAttributes( OutputPage $out, Skin $sk, &$bodyAttrs ) {
if ( !$sk instanceof SkinVector ) {
return;
}
$skinVersionLookup = new SkinVersionLookup(
$out->getRequest(), $sk->getUser(), self::getServiceConfig()
);