From e7cf4c99a577bc9b91b4c4152d97a1f75ecd8855 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Wed, 26 Jan 2022 14:41:39 -0800 Subject: [PATCH] Refactor type in host-set factory --- addons/api/mirage/factories/host-set.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/api/mirage/factories/host-set.js b/addons/api/mirage/factories/host-set.js index d4372bef5..4bb6ad7bb 100644 --- a/addons/api/mirage/factories/host-set.js +++ b/addons/api/mirage/factories/host-set.js @@ -13,9 +13,7 @@ export default factory.extend({ ], id: (i) => `host-set-id-${i}`, type() { - if (this.hostCatalog) { - return this.hostCatalog.type; - } + return this.hostCatalog?.type || factory.attrs.type; }, plugin() { if (this.type === 'plugin') {