mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: don't crash if body doesn't have skin-
This commit is contained in:
@@ -778,6 +778,9 @@ app.cacheBuster = null;
|
||||
var currentSkinClassName = $('body').attr('class').split(/\s+/).filter(function (className) {
|
||||
return className.startsWith('skin-');
|
||||
});
|
||||
if (!currentSkinClassName[0]) {
|
||||
return;
|
||||
}
|
||||
var currentSkin = currentSkinClassName[0].slice(5);
|
||||
currentSkin = currentSkin !== 'noskin' ? currentSkin : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user