From 5f73c5d392ec066323a3c999aa390489dd7bfe50 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Thu, 19 Oct 2017 17:15:10 -0700 Subject: [PATCH] Handle the undefined TotalTicks case --- ui/app/models/allocation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/models/allocation.js b/ui/app/models/allocation.js index 889265317..810213bfe 100644 --- a/ui/app/models/allocation.js +++ b/ui/app/models/allocation.js @@ -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() {