File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,11 +47,16 @@ export function getProjectEndpoint(): string {
4747
4848export function isProjectBlocked ( project : Models . Project | null | undefined ) : boolean {
4949 const hasGlobalProjectBlock = ( project ?. blocks ?? [ ] ) . some ( ( block ) => {
50- const type = block . resourceType ?. trim ( ) ;
50+ const type = block . resourceType ?. trim ( ) . toLowerCase ( ) ;
5151 const id = block . resourceId ?. trim ( ) ;
5252
53- // Global project block: no specific resourceType or resourceId set
54- return ! type && ! id ;
53+ // Global project block:
54+ // - legacy: both type and id empty
55+ // - new: resourceType === 'projects' with no specific resourceId
56+ const isLegacyGlobal = ! type && ! id ;
57+ const isProjectsGlobal = type === 'projects' && ! id ;
58+
59+ return isLegacyGlobal || isProjectsGlobal ;
5560 } ) ;
5661
5762 return project ?. status !== 'paused' && hasGlobalProjectBlock ;
You can’t perform that action at this time.
0 commit comments