js/ui: check whether a link tag has a type
The new favicon didn't have such, resulting in JS error when reloading CSS at runtime.
This commit is contained in:
parent
9ce99bf280
commit
f40ada6c81
|
@ -100,7 +100,7 @@
|
||||||
icinga.logger.info('Reloading CSS');
|
icinga.logger.info('Reloading CSS');
|
||||||
$('link').each(function() {
|
$('link').each(function() {
|
||||||
var $oldLink = $(this);
|
var $oldLink = $(this);
|
||||||
if ($oldLink.attr('type').indexOf('css') > -1) {
|
if ($oldLink.hasAttr('type') && $oldLink.attr('type').indexOf('css') > -1) {
|
||||||
var $newLink = $oldLink.clone().attr(
|
var $newLink = $oldLink.clone().attr(
|
||||||
'href',
|
'href',
|
||||||
icinga.utils.addUrlParams(
|
icinga.utils.addUrlParams(
|
||||||
|
|
Loading…
Reference in New Issue