File tree Expand file tree Collapse file tree
web/src/components/dashboards/perses Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export const DashboardCreateDialog: React.FunctionComponent = () => {
5252 return [ ] ;
5353 }
5454
55- return editableProjects . map ( ( project ) => ( {
55+ return editableProjects ? .map ( ( project ) => ( {
5656 content : project ,
5757 value : project ,
5858 selected : project === selectedProject ,
@@ -96,7 +96,7 @@ export const DashboardCreateDialog: React.FunctionComponent = () => {
9696 return ;
9797 }
9898
99- const projectExists = editableProjects . some ( ( project ) => project === selectedProject ) ;
99+ const projectExists = editableProjects ? .some ( ( project ) => project === selectedProject ) ;
100100
101101 if ( ! projectExists ) {
102102 try {
@@ -172,7 +172,7 @@ export const DashboardCreateDialog: React.FunctionComponent = () => {
172172
173173 return (
174174 < >
175- { disabled ? (
175+ { ! hasEditableProject ? (
176176 < Tooltip
177177 content = { t ( 'To create dashboards, contact your cluster administrator for permission.' ) }
178178 >
You can’t perform that action at this time.
0 commit comments