Skip to content

Commit 08d209d

Browse files
committed
fix panic
1 parent 2718ae7 commit 08d209d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/rspack_core/src/compiler/make/cutout/fix_issuers.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ impl FixIssuers {
162162
) {
163163
let module_graph = artifact.get_module_graph();
164164
for dep_id in dep_ids {
165-
let conn = module_graph
166-
.connection_by_dependency_id(dep_id)
167-
.expect("should have connection");
165+
let Some(conn) = module_graph.connection_by_dependency_id(dep_id) else {
166+
// maybe factorize failed dep_id
167+
continue;
168+
};
169+
168170
let parent_mid = &conn.original_module_identifier;
169171
let child_mid = conn.module_identifier();
170172
// peresistent cache recovery module graph will lose some module and mgm.

0 commit comments

Comments
 (0)