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 9842f046f1
commit 7ebfd066ef
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/:name')
async fetchOne({ partition, ns, dc, name }, { uri }, request) {
if (name === '') {
if (typeof name === 'undefined' || name === '') {
const item = this.create({
Datacenter: dc,
Namespace: '',