Skip to content

Commit

Permalink
templates: Fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sgued authored and Keats committed Feb 16, 2023
1 parent f877835 commit 3ef719a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/templates/src/global_fns/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ impl TeraFn for GetUrl {
// anything else
let mut segments = vec![];

if lang != self.config.default_language {
if path.is_empty() || !path[1..].starts_with(&lang) {
segments.push(lang);
}
if lang != self.config.default_language
&& (path.is_empty() || !path[1..].starts_with(&lang))
{
segments.push(lang);
}

segments.push(path);
Expand Down

0 comments on commit 3ef719a

Please sign in to comment.