File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -197,13 +197,24 @@ export class DigitalExperienceSourceAdapter extends BundleSourceAdapter {
197197 if ( component ) {
198198 return component ;
199199 }
200- const bundleName = this . getBundleName ( trigger ) ;
200+
201201 const pathParts = trigger . split ( sep ) ;
202- const bundleDir = pathParts . slice ( 0 , getDigitalExperiencesIndex ( trigger ) + 3 ) . join ( sep ) ;
202+ const digitalExperiencesIndex = pathParts . indexOf ( 'digitalExperiences' ) ;
203+
204+ // Extract bundle name: web_app/WebApp3
205+ const baseType = pathParts [ digitalExperiencesIndex + 1 ] ;
206+ const spaceApiName = pathParts [ digitalExperiencesIndex + 2 ] ;
207+ const bundleName = `${ baseType } /${ spaceApiName } ` ;
208+
209+ // Extract bundle directory: /path/to/digitalExperiences/web_app/WebApp3
210+ const bundleDir = pathParts . slice ( 0 , digitalExperiencesIndex + 3 ) . join ( sep ) ;
211+
212+ // Get the DigitalExperienceBundle type
203213 const parentType = this . isBundleType ( ) ? this . type : this . registry . getParentType ( this . type . id ) ;
204214 if ( ! parentType ) {
205215 throw messages . createError ( 'error_failed_convert' , [ bundleName ] ) ;
206216 }
217+
207218 return new SourceComponent (
208219 {
209220 name : bundleName ,
You can’t perform that action at this time.
0 commit comments