File tree 2 files changed +14
-7
lines changed
2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change
1
+ ## 2.0.3
2
+ ### Bug fixes
3
+ - fix: css var polyfill
4
+
1
5
## 2.0.2
2
6
3
7
### Bug fixes
Original file line number Diff line number Diff line change @@ -14,14 +14,17 @@ export function cssVars () {
14
14
if ( block . nodeName === 'STYLE' ) {
15
15
replaceVar ( block )
16
16
} else if ( block . nodeName === 'LINK' ) {
17
- load ( block . getAttribute ( 'href' ) )
18
- . then ( res => {
19
- const style = document . createElement ( 'style' )
17
+ const href = block . getAttribute ( 'href' )
20
18
21
- style . innerHTML = res
22
- document . head . appendChild ( style )
23
- replaceVar ( style )
24
- } )
19
+ if ( / \. c s s $ / . test ( href ) ) return
20
+
21
+ load ( href ) . then ( res => {
22
+ const style = document . createElement ( 'style' )
23
+
24
+ style . innerHTML = res
25
+ document . head . appendChild ( style )
26
+ replaceVar ( style )
27
+ } )
25
28
}
26
29
} )
27
30
}
You can’t perform that action at this time.
0 commit comments