Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.

Commit ad4c25a

Browse files
author
Rakesh Venkatesh
committed
check if param exists
1 parent e82335b commit ad4c25a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/config/section/project.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,13 @@ export default {
140140
show: (record, store) => {
141141
return (['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)) || record.isCurrentUserProjectAdmin
142142
},
143-
args: ['cleanup']
143+
args: (record, store) => {
144+
const fields = []
145+
if (store.apis.deleteProject.params.filter(x => x.name === 'cleanup').length > 0) {
146+
fields.push('cleanup')
147+
}
148+
return fields
149+
}
144150
}
145151
]
146152
}

0 commit comments

Comments
 (0)