Skip to content

Commit e1952c7

Browse files
committed
fix: use_resolved_path doesn't return option anymore
1 parent 1e938d9 commit e1952c7

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

router/src/link.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,14 @@ where
133133
let is_active = {
134134
let href = href.clone();
135135
move || {
136-
href.read().as_deref().is_some_and(|to| {
137-
let path = normalize_path(to);
138-
current_url.with(|loc| {
139-
let loc = loc.path();
140-
if exact {
141-
loc == path
142-
} else {
143-
is_active_for(&path, loc, strict_trailing_slash)
144-
}
145-
})
136+
let path = normalize_path(&href.read());
137+
current_url.with(|loc| {
138+
let loc = loc.path();
139+
if exact {
140+
loc == path
141+
} else {
142+
is_active_for(&path, loc, strict_trailing_slash)
143+
}
146144
})
147145
}
148146
};

0 commit comments

Comments
 (0)