···108108 let canonical_changed = changed_file.canonicalize().ok();
109109110110 // Try exact match with canonical path
111111- if let Some(canonical) = &canonical_changed {
112112- if let Some(routes) = self.asset_to_routes.get(canonical) {
113113- affected_routes.extend(routes.iter().cloned());
114114- continue; // Found exact match, no need for directory check
115115- }
111111+ if let Some(canonical) = &canonical_changed
112112+ && let Some(routes) = self.asset_to_routes.get(canonical)
113113+ {
114114+ affected_routes.extend(routes.iter().cloned());
115115+ continue; // Found exact match, no need for directory check
116116 }
117117118118 // Fallback: try exact match with original path (shouldn't normally match)