mirror of
https://github.com/less/less.js.git
synced 2026-01-24 14:48:00 -05:00
Use if rather than try
This commit is contained in:
@@ -104,10 +104,10 @@ function loadStyles() {
|
||||
var css = tree.toCSS();
|
||||
var style = styles[i];
|
||||
style.type = 'text/css';
|
||||
try {
|
||||
style.innerHTML = css;
|
||||
} catch (_) {
|
||||
if (style.styleSheet) {
|
||||
style.styleSheet.cssText = css;
|
||||
} else {
|
||||
style.innerHTML = css;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user