File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ export default class BrowserSelection {
166
166
return result ;
167
167
}
168
168
169
- /** @readonly */
169
+ /** @type { Map<string, MissingSupportResult> } @ readonly */
170
170
static #missingSupportCache = new Map ( ) ;
171
171
172
172
/**
@@ -179,7 +179,7 @@ export default class BrowserSelection {
179
179
// browserslist only uses `path` if `query` is not provided.
180
180
const key = query ? JSON . stringify ( query ) : path ;
181
181
182
- if ( this . #missingSupportCache. has ( key ) ) {
182
+ if ( key && this . #missingSupportCache. has ( key ) ) {
183
183
return this . #missingSupportCache. get ( key ) ;
184
184
}
185
185
@@ -188,7 +188,7 @@ export default class BrowserSelection {
188
188
browsers : selection . list ( ) ,
189
189
features : selection . compileBrowserSupport ( ) ,
190
190
} ;
191
- this . #missingSupportCache. set ( key , result ) ;
191
+ if ( key ) this . #missingSupportCache. set ( key , result ) ;
192
192
return result ;
193
193
}
194
194
}
You can’t perform that action at this time.
0 commit comments