ui: Add undefined check for peer model creation (#14075)
This commit is contained in:
parent
9842f046f1
commit
7ebfd066ef
|
@ -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