Skip to content

Commit

Permalink
chore: 🤖 tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
IWANABETHATGUY committed Aug 20, 2024
1 parent 03f0c0e commit e364fc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/oxc_minifier/src/plugins/inject_global_variables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl<'a> From<&InjectImport> for DotDefineState<'a> {
fn from(inject: &InjectImport) -> Self {
let parts = inject.specifier.local().split('.').map(CompactStr::from).collect::<Vec<_>>();
let value = inject.replace_value.clone().unwrap();
let dot_define = DotDefine { parts, value, postfix_wildcard: false };
let dot_define = DotDefine { parts, value };
Self { dot_define, value_atom: None }
}
}
Expand Down
7 changes: 3 additions & 4 deletions crates/oxc_minifier/src/plugins/replace_global_defines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub struct DotDefine {
/// Member expression parts
pub parts: Vec<CompactStr>,
pub value: CompactStr,
pub postfix_wildcard: bool,
}

#[derive(Debug)]
Expand All @@ -47,8 +46,8 @@ impl MetaPropertyDefine {
}

impl DotDefine {
fn new(parts: Vec<CompactStr>, value: CompactStr, postfix_wildcard: bool) -> Self {
Self { parts, value, postfix_wildcard }
fn new(parts: Vec<CompactStr>, value: CompactStr) -> Self {
Self { parts, value }
}
}

Expand Down Expand Up @@ -80,7 +79,7 @@ impl ReplaceGlobalDefinesConfig {
identifier_defines.push((CompactStr::new(key), CompactStr::new(value)));
}
IdentifierType::DotDefines { parts } => {
dot_defines.push(DotDefine::new(parts, CompactStr::new(value), false));
dot_defines.push(DotDefine::new(parts, CompactStr::new(value)));
}
IdentifierType::ImportMeta { parts, postfix_wildcard } => {
meta_proeperty_defines.push(MetaPropertyDefine::new(
Expand Down

0 comments on commit e364fc7

Please sign in to comment.