From 9186f75c6a2abf540ed74abfefd65b6bf3a43e5c Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Wed, 12 Feb 2020 22:13:16 -0800 Subject: [PATCH] Fix a bug where the NodeListStub API response would override existing HostVolumes in the store --- ui/app/serializers/node.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/app/serializers/node.js b/ui/app/serializers/node.js index 084d5ac20..1d25e3159 100644 --- a/ui/app/serializers/node.js +++ b/ui/app/serializers/node.js @@ -17,8 +17,10 @@ export default ApplicationSerializer.extend({ return assign({}, drivers[key], { Name: key }); }); - const hostVolumes = hash.HostVolumes || {}; - hash.HostVolumes = Object.keys(hostVolumes).map(key => hostVolumes[key]); + if (hash.HostVolumes) { + const hostVolumes = hash.HostVolumes; + hash.HostVolumes = Object.keys(hostVolumes).map(key => hostVolumes[key]); + } return this._super(modelClass, hash); },