From e4a579022bbe14a5562e9e2a21f33c8ea75e8731 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 9 Aug 2022 11:08:07 +0100 Subject: [PATCH] ui: Add undefined check for peer model creation (#14075) --- ui/packages/consul-ui/app/services/repository/peer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/packages/consul-ui/app/services/repository/peer.js b/ui/packages/consul-ui/app/services/repository/peer.js index 432b06fbbb..5f66708e2a 100644 --- a/ui/packages/consul-ui/app/services/repository/peer.js +++ b/ui/packages/consul-ui/app/services/repository/peer.js @@ -55,7 +55,7 @@ export default class PeerService extends RepositoryService { @dataSource('/:partition/:ns/:dc/peer-initiate/') @dataSource('/:partition/:ns/:dc/peer/:name') async fetchOne({ partition, ns, dc, name }, { uri }, request) { - if (name === '') { + if (typeof name === 'undefined' || name === '') { const item = this.create({ Datacenter: dc, Namespace: '',