mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 06:05:02 +03:00
chore(es/preset-env): Ignore tp
in the version of a browser version (#7968)
This commit is contained in:
parent
e749328312
commit
005ddc573e
@ -201,7 +201,17 @@ pub(crate) static FEATURES: Lazy<AHashMap<Feature, BrowserData<Option<Version>>>
|
||||
.map(|(feature, version)| {
|
||||
(
|
||||
feature,
|
||||
version.map_value(|version| version.map(|v| v.parse().unwrap())),
|
||||
version.map_value(|version| {
|
||||
if matches!(version.as_deref(), Some("tp")) {
|
||||
return None;
|
||||
}
|
||||
|
||||
version.map(|v| {
|
||||
v.parse().unwrap_or_else(|err| {
|
||||
panic!("failed to parse `{v}` as a version: {err:?}")
|
||||
})
|
||||
})
|
||||
}),
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
|
Loading…
Reference in New Issue
Block a user