ui: Add undefined check for peer model creation (#14075)

This commit is contained in:
John Cowen 2022-08-09 11:08:07 +01:00 committed by GitHub
parent c3326d319a
commit e4a579022b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ export default class PeerService extends RepositoryService {
@dataSource('/:partition/:ns/:dc/peer-initiate/') @dataSource('/:partition/:ns/:dc/peer-initiate/')
@dataSource('/:partition/:ns/:dc/peer/:name') @dataSource('/:partition/:ns/:dc/peer/:name')
async fetchOne({ partition, ns, dc, name }, { uri }, request) { async fetchOne({ partition, ns, dc, name }, { uri }, request) {
if (name === '') { if (typeof name === 'undefined' || name === '') {
const item = this.create({ const item = this.create({
Datacenter: dc, Datacenter: dc,
Namespace: '', Namespace: '',