Skip to content

Commit 2c769cb

Browse files
committed
Transpose if statements
1 parent 9243881 commit 2c769cb

File tree

1 file changed

+4
-4
lines changed
  • crates/bevy_ecs/src/system/commands

1 file changed

+4
-4
lines changed

crates/bevy_ecs/src/system/commands/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -734,11 +734,11 @@ where
734734
if let Some(bundle) = bundle {
735735
if let Some(mut target) = world.get_entity_mut(self.target) {
736736
target.insert_bundle(bundle);
737+
} else {
738+
panic!("Could not move a bundle (of type `{}`) to entity {:?} because it doesn't exist in this World.\n\
739+
If this command was added to a newly spawned entity, ensure that you have not despawned that entity within the same stage.\n\
740+
This may have occurred due to system order ambiguity, or if the spawning system has multiple command buffers", std::any::type_name::<T>(), self.target);
737741
}
738-
} else {
739-
panic!("Could not move a bundle (of type `{}`) to entity {:?} because it doesn't exist in this World.\n\
740-
If this command was added to a newly spawned entity, ensure that you have not despawned that entity within the same stage.\n\
741-
This may have occurred due to system order ambiguity, or if the spawning system has multiple command buffers", std::any::type_name::<T>(), self.source);
742742
}
743743
}
744744
}

0 commit comments

Comments
 (0)