File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
tools/pfe-tools/custom-elements-manifest/lib Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -318,8 +318,8 @@ export class Manifest {
318318 decodeURIComponent ( demo . source ?. href . replace ( options . sourceControlURLPrefix , '' ) ?? '' ) ;
319319 // split the demoSource into an array of parts
320320 const demoSourceParts = demoSource . split ( '/' ) ;
321- // if demoSourceParts contains options.elementsDir, then build the filePath from the rootDir and the demoSource
322- const filePath = demoSourceParts . includes ( options . elementsDir ) ?
321+ // if first part of demoSourceParts contains options.elementsDir, then build the filePath from the rootDir and the demoSource
322+ const filePath = ( demoSourceParts . shift ( ) === options . elementsDir ) ?
323323 path . normalize ( path . posix . join ( options . rootDir , demoSource ) )
324324 : path . normalize ( path . posix . join ( options . rootDir , options . elementsDir , demoSource ) ) ;
325325 const [ last = '' ] = filePath . split ( path . sep ) . reverse ( ) ;
You can’t perform that action at this time.
0 commit comments