From: Victor Dubiniuk Date: Tue, 2 Jul 2013 15:44:10 +0000 (+0300) Subject: Fix lazy styles loading in IE8 X-Git-Tag: v6.0.0alpha2~488^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=16e5a1b10025c84465caf93458c40efb8a6aa87d;p=nextcloud-server.git Fix lazy styles loading in IE8 --- diff --git a/core/js/js.js b/core/js/js.js index 3904787c4e5..5158b66d73a 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -226,8 +226,12 @@ var OC={ var path=OC.filePath(app,'css',style+'.css'); if(OC.addStyle.loaded.indexOf(path)===-1){ OC.addStyle.loaded.push(path); - style=$(''); - $('head').append(style); + if (document.createStyleSheet) { + document.createStyleSheet(path); + } else { + style=$(''); + $('head').append(style); + } } }, basename: function(path) {