Skip to content
Snippets Groups Projects
Commit 2f778f0b authored by ml bonhomme's avatar ml bonhomme :bee: Committed by Erwan Rouchet
Browse files

Fix state tag color race condition when deleting a process

parent 76e3a28a
No related branches found
No related tags found
1 merge request!1560Fix state tag color race condition when deleting a process
......@@ -15,16 +15,18 @@ import { PropType, defineComponent } from 'vue'
export default defineComponent({
props: {
state: {
type: String as PropType<ProcessState>,
type: String as PropType<ProcessState | undefined>,
required: true,
validator: value => typeof value === 'string' && value in PROCESS_STATES
}
},
computed: {
color () {
color (): string {
if (!this.state) return PROCESS_STATE_COLORS.default.cssClass
return PROCESS_STATE_COLORS[this.state].cssClass
},
displayName () {
if (!this.state) return 'Unknown'
return PROCESS_STATES[this.state]
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment