From 74d0e88df34984bfc7832f7743c6cfc3fe54f9b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 12 Dec 2018 11:16:49 -0500 Subject: [PATCH] fix: don't explode if there is no css el --- public/src/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/src/app.js b/public/src/app.js index 6c5103165c..585ce34484 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -747,7 +747,9 @@ app.cacheBuster = null; var clientEl = Array.prototype.filter.call(document.querySelectorAll('link[rel="stylesheet"]'), function (el) { return el.href.indexOf(config.relative_path + '/assets/client') !== -1; })[0] || null; - + if (!clientEl) { + return; + } // Update client.css link element to point to selected skin variant clientEl.href = config.relative_path + '/assets/client' + (skinName ? '-' + skinName : '') + '.css';