File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
frontend/src/config/integrations/github-nango/components/settings Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -138,9 +138,19 @@ const isDrawerVisible = computed({
138138});
139139
140140const fetchSubProjects = () => {
141- LfService .findSegment (props .grandparentId ).then ((segment ) => {
142- subprojects .value = segment .projects .map ((p ) => p .subprojects ).flat ().filter ((s ) => s !== undefined );
143- });
141+ // OSS projects have thousands of subprojects which crash the app
142+ const EXTERNAL_OSS_SEGMENT_ID = ' 0fc01c53-8a6a-47db-b0cd-53de0ee65190' ;
143+
144+ if (props .grandparentId === EXTERNAL_OSS_SEGMENT_ID && props .segmentId ) {
145+ // Only fetch current subproject, avoiding thousands of others
146+ LfService .findSegment (props .segmentId ).then ((currentSubproject ) => {
147+ subprojects .value = [currentSubproject ];
148+ });
149+ } else {
150+ LfService .findSegment (props .grandparentId ).then ((segment ) => {
151+ subprojects .value = segment .projects .map ((p ) => p .subprojects ).flat ().filter ((s ) => s !== undefined );
152+ });
153+ }
144154};
145155
146156const $v = useVuelidate ();
You can’t perform that action at this time.
0 commit comments