We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cb4e8b commit b5854b0Copy full SHA for b5854b0
crates/turbopack-core/src/chunk/chunk_group.rs
@@ -182,9 +182,5 @@ async fn references_to_output_assets(
182
.copied()
183
.filter(|&asset| set.insert(asset))
184
.collect::<Vec<_>>();
185
- Ok(if output_assets.is_empty() {
186
- OutputAssets::empty()
187
- } else {
188
- OutputAssets::new(output_assets)
189
- })
+ Ok(OutputAssets::new(output_assets))
190
}
crates/turbopack-core/src/output.rs
@@ -25,7 +25,11 @@ pub struct OutputAssets(Vec<Vc<Box<dyn OutputAsset>>>);
25
impl OutputAssets {
26
#[turbo_tasks::function]
27
pub fn new(assets: Vec<Vc<Box<dyn OutputAsset>>>) -> Vc<Self> {
28
- Vc::cell(assets)
+ if assets.is_empty() {
29
+ OutputAssets::empty()
30
+ } else {
31
+ Vc::cell(assets)
32
+ }
33
34
35
0 commit comments