mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: don't explode if there is no css el
This commit is contained in:
@@ -747,7 +747,9 @@ app.cacheBuster = null;
|
|||||||
var clientEl = Array.prototype.filter.call(document.querySelectorAll('link[rel="stylesheet"]'), function (el) {
|
var clientEl = Array.prototype.filter.call(document.querySelectorAll('link[rel="stylesheet"]'), function (el) {
|
||||||
return el.href.indexOf(config.relative_path + '/assets/client') !== -1;
|
return el.href.indexOf(config.relative_path + '/assets/client') !== -1;
|
||||||
})[0] || null;
|
})[0] || null;
|
||||||
|
if (!clientEl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Update client.css link element to point to selected skin variant
|
// Update client.css link element to point to selected skin variant
|
||||||
clientEl.href = config.relative_path + '/assets/client' + (skinName ? '-' + skinName : '') + '.css';
|
clientEl.href = config.relative_path + '/assets/client' + (skinName ? '-' + skinName : '') + '.css';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user