Browse Source

Fixed builder problem

YuKun Liu 3 years ago
parent
commit
87e6ed0a3d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/builder.rs

+ 3 - 1
src/builder.rs

@@ -398,7 +398,9 @@ fn build_assets(config: &CrateConfig) -> Result<Vec<PathBuf>> {
                             {
                                 let temp = entry.path();
                                 if temp.is_file() {
-                                    let suffix = temp.extension().unwrap().to_str().unwrap();
+                                    let suffix = temp.extension();
+                                    if suffix.is_none() { continue; }
+                                    let suffix = suffix.unwrap().to_str().unwrap();
                                     if suffix == "scss" || suffix == "sass" {
                                         // if file suffix is `scss` / `sass` we need transform it.
                                         let out_file = format!(