Skip to content

Commit 2a43a27

Browse files
committed
print <empty> for empty task call stack
1 parent a2605c5 commit 2a43a27

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

crates/vite_task_plan/src/context.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ pub struct TaskCallStackDisplay {
6666

6767
impl Display for TaskCallStackDisplay {
6868
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
69+
if self.frames.is_empty() {
70+
write!(f, "<empty>")?;
71+
return Ok(());
72+
}
6973
for (i, frame) in self.frames.iter().enumerate() {
7074
if i > 0 {
7175
write!(f, " -> ")?;

0 commit comments

Comments
 (0)