From 9fed69ee1b5599138c1d30c3ab77f0838d1d39df Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Wed, 5 Aug 2020 15:31:29 -0500 Subject: [PATCH] Add override for null events collection This removes some errors in the console if there are no autoscaling events. --- ui/app/serializers/task-group-scale.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 ui/app/serializers/task-group-scale.js diff --git a/ui/app/serializers/task-group-scale.js b/ui/app/serializers/task-group-scale.js new file mode 100644 index 000000000..057fa86d0 --- /dev/null +++ b/ui/app/serializers/task-group-scale.js @@ -0,0 +1,11 @@ +import ApplicationSerializer from './application'; + +export default class TaskGroupScaleSerializer extends ApplicationSerializer { + normalize(typeHash, hash) { + if (!hash.Events) { + hash.Events = []; + } + + return super.normalize(typeHash, hash); + } +}