From 5d49c16bc2ab9caadd6495655fb180f85dc72629 Mon Sep 17 00:00:00 2001 From: mattcompiles Date: Thu, 19 Dec 2024 10:39:49 +1100 Subject: [PATCH] Improve target matching --- crates/atlaspack/src/requests/target_request.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/atlaspack/src/requests/target_request.rs b/crates/atlaspack/src/requests/target_request.rs index 513f20962..01ea19df0 100644 --- a/crates/atlaspack/src/requests/target_request.rs +++ b/crates/atlaspack/src/requests/target_request.rs @@ -369,7 +369,11 @@ impl TargetRequest { .options .targets .as_ref() - .is_some_and(|targets| !targets.contains(&String::from(custom_target.name))) + .is_some_and(|targets| { + !targets + .iter() + .any(|target_name| target_name == custom_target.name) + }) { tracing::debug!( "Skipping custom target {} as it doesn't match passed in target options",