File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const crypto = require('crypto');
16
16
17
17
const glob = require ( 'tiny-glob/sync' ) ;
18
18
19
- const processed = Symbol ( 'processed' )
19
+ const processed = new WeakSet ( ) ;
20
20
21
21
const getAdaptivePropSelector = ( userProps ) => {
22
22
return ( prop ) => {
@@ -138,7 +138,7 @@ module.exports = (UserProps) => {
138
138
AtRule : {
139
139
media : atrule => {
140
140
// bail early if possible
141
- if ( atrule [ processed ] ) return
141
+ if ( processed . has ( atrule ) ) return
142
142
143
143
// extract prop from atrule params
144
144
let prop = atrule . params . replace ( / [ ( ) ] + / g, '' ) ;
@@ -162,14 +162,14 @@ module.exports = (UserProps) => {
162
162
STATE . target_ss . prepend ( value )
163
163
164
164
// track work to prevent duplication
165
- atrule [ processed ] = true
165
+ processed . add ( atrule )
166
166
STATE . mapped . add ( prop )
167
167
}
168
168
} ,
169
169
170
170
Declaration ( node , { Declaration } ) {
171
171
// bail early
172
- if ( node [ processed ] || ! node . value ) return
172
+ if ( processed . has ( node ) || ! node . value ) return
173
173
// console.log(node)
174
174
let matches = node . value . match ( / v a r \( \s * ( - - [ \w \d - _ ] + ) / g)
175
175
@@ -223,7 +223,7 @@ module.exports = (UserProps) => {
223
223
}
224
224
225
225
// track work to prevent duplicative processing
226
- node [ processed ] = true
226
+ processed . add ( node )
227
227
}
228
228
}
229
229
}
You can’t perform that action at this time.
0 commit comments