Skip to content

Commit 3af8c3d

Browse files
committed
Add fallback display for unknown job type
In case we encounter an unknown job type, showing that type is better than just 'undefined'.
1 parent b04d0a9 commit 3af8c3d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/AdminBar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ function static_deploy_update_status() {
133133
text = "Queued";
134134
}
135135
} else {
136-
text = static_deploy_job_type_labels[data.jobs[0].job_type];
136+
let type = data.jobs[0].job_type;
137+
text = static_deploy_job_type_labels[type] || type;
137138
}
138139

139140
static_deploy_update_status_button(text, bgcolor);

0 commit comments

Comments
 (0)