diff --git a/provider/baked/datetime/data/macros/datetime_patterns_time_v1.rs.data b/provider/baked/datetime/data/macros/datetime_patterns_time_v1.rs.data index 305138fd3a7..3932847c1cf 100644 --- a/provider/baked/datetime/data/macros/datetime_patterns_time_v1.rs.data +++ b/provider/baked/datetime/data/macros/datetime_patterns_time_v1.rs.data @@ -151,13 +151,13 @@ macro_rules! __impl_datetime_patterns_time_v1 { const FALLBACKER: icu::locid_transform::fallback::LocaleFallbackerWithConfig<'static> = icu::locid_transform::fallback::LocaleFallbacker::new().for_config(::KEY.fallback_config()); let mut fallback_iterator = FALLBACKER.fallback_for(req.locale.clone()); loop { - if fallback_iterator.get().is_und() { - return Err(icu_provider::DataErrorKind::MissingLocale.with_req(::KEY, req)); - } if let Ok(payload) = KEYS.binary_search_by(|k| fallback_iterator.get().strict_cmp(k.as_bytes()).reverse()).map(|i| *unsafe { VALUES.get_unchecked(i) }) { metadata.locale = Some(fallback_iterator.take()); break payload; } + if fallback_iterator.get().is_und() { + return Err(icu_provider::DataErrorKind::MissingLocale.with_req(::KEY, req)); + } fallback_iterator.step(); } };