Skip to content

Commit

Permalink
fix: logic
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Nov 4, 2022
1 parent eda08b7 commit 1e1b651
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions crates/swc_css_minifier/src/compressor/import.rs
Expand Up @@ -3,8 +3,8 @@ use swc_css_ast::*;
use super::Compressor;

impl Compressor {
pub(super) fn compress_import_prelude_href(&mut self, import_href: &mut ImportPreludeHref) {
if let ImportPreludeHref::Url(Url {
pub(super) fn compress_import_href(&mut self, import_href: &mut ImportHref) {
if let ImportHref::Url(Url {
value: Some(value),
modifiers,
span,
Expand All @@ -22,7 +22,7 @@ impl Compressor {
UrlValue::Raw(UrlValueRaw { value, .. }) => value,
};

*import_href = ImportPreludeHref::Str(Str {
*import_href = ImportHref::Str(Str {
span: *span,
value: (&*new_value).into(),
raw: None,
Expand Down
4 changes: 2 additions & 2 deletions crates/swc_css_minifier/src/compressor/mod.rs
Expand Up @@ -139,10 +139,10 @@ impl VisitMut for Compressor {
self.compress_keyframes_at_rule(n);
}

fn visit_mut_import_prelude_href(&mut self, n: &mut ImportPreludeHref) {
fn visit_mut_import_href(&mut self, n: &mut ImportHref) {
n.visit_mut_children_with(self);

self.compress_import_prelude_href(n);
self.compress_import_href(n);
}

fn visit_mut_media_query_list(&mut self, n: &mut MediaQueryList) {
Expand Down

0 comments on commit 1e1b651

Please sign in to comment.