mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46: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) {
|
var currentSkinClassName = $('body').attr('class').split(/\s+/).filter(function (className) {
|
||||||
return className.startsWith('skin-');
|
return className.startsWith('skin-');
|
||||||
});
|
});
|
||||||
|
if (!currentSkinClassName[0]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var currentSkin = currentSkinClassName[0].slice(5);
|
var currentSkin = currentSkinClassName[0].slice(5);
|
||||||
currentSkin = currentSkin !== 'noskin' ? currentSkin : '';
|
currentSkin = currentSkin !== 'noskin' ? currentSkin : '';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user