File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -70,5 +70,6 @@ export const getTagInfo = async ({
70
70
71
71
export const removeSrcAttribute = ( attributes : Record < string , any > ) => {
72
72
const { src, ...rest } = attributes ;
73
+
73
74
return rest ;
74
75
} ;
Original file line number Diff line number Diff line change @@ -83,18 +83,16 @@ const transformer: Transformer<Options.GlobalStyle> = async ({
83
83
map : options ?. sourceMap ? { prev : map } : false ,
84
84
} ) ;
85
85
86
+ if ( attributes ?. global ) {
87
+ const { global, ...rest } = attributes ;
88
+
89
+ attributes = rest ;
90
+ }
91
+
86
92
return {
87
93
code : css ,
88
94
map : newMap ,
89
- attributes :
90
- attributes &&
91
- Object . keys ( attributes ) . reduce ( ( acc : any , key ) => {
92
- if ( key !== 'global' ) {
93
- acc [ key ] = attributes [ key ] ;
94
- }
95
-
96
- return acc ;
97
- } , { } ) ,
95
+ attributes,
98
96
} ;
99
97
} ;
100
98
You can’t perform that action at this time.
0 commit comments