Handle the undefined TotalTicks case

This commit is contained in:
Michael Lange 2017-10-19 17:15:10 -07:00
parent 44acb58f8c
commit 5f73c5d392

View file

@ -45,7 +45,7 @@ export default Model.extend({
memoryUsed: computed.readOnly('stats.ResourceUsage.MemoryStats.RSS'),
cpuUsed: computed('stats.ResourceUsage.CpuStats.TotalTicks', function() {
return Math.floor(this.get('stats.ResourceUsage.CpuStats.TotalTicks'));
return Math.floor(this.get('stats.ResourceUsage.CpuStats.TotalTicks') || 0);
}),
percentMemory: computed('taskGroup.reservedMemory', 'memoryUsed', function() {