mirror of https://github.com/status-im/consul.git
ui: Add undefined check for peer model creation (#14075)
This commit is contained in:
parent
c3326d319a
commit
e4a579022b
|
@ -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: '',
|
||||
|
|
Loading…
Reference in New Issue