catch
This commit is contained in:
parent
6610a103eb
commit
d5fe0e53d8
1 changed files with 5 additions and 0 deletions
|
|
@ -23,6 +23,11 @@ export const createStyleSheet = (id) => {
|
|||
if (!el?.sheet) {
|
||||
el = document.getElementById(id + '-link')
|
||||
}
|
||||
try {
|
||||
el.sheet.insertRule(':root { padding: initial }')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
// Clear all rules in it
|
||||
for (let i = el.sheet.cssRules.length - 1; i >= 0; --i) {
|
||||
el.sheet.deleteRule(i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue