File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
tools/pfe-tools/custom-elements-manifest/lib Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -319,15 +319,9 @@ export class Manifest {
319319 // split the demoSource into an array of parts
320320 const demoSourceParts = demoSource . split ( '/' ) ;
321321 // if demoSourceParts contains options.elementsDir, then build the filePath from the rootDir and the demoSource
322- let filePath ;
323- if ( demoSourceParts . includes ( options . elementsDir ) ) {
324- filePath =
325- path . normalize ( path . posix . join ( options . rootDir , demoSource ) ) ;
326- // otherwise, build the filePath from the rootDir, options.elementsDir, and the demoSource
327- } else {
328- filePath =
329- path . normalize ( path . posix . join ( options . rootDir , options . elementsDir , demoSource ) ) ;
330- }
322+ const filePath = demoSourceParts . includes ( options . elementsDir ) ?
323+ path . normalize ( path . posix . join ( options . rootDir , demoSource ) )
324+ : path . normalize ( path . posix . join ( options . rootDir , options . elementsDir , demoSource ) ) ;
331325 const [ last = '' ] = filePath . split ( path . sep ) . reverse ( ) ;
332326 const filename = last . replace ( '.html' , '' ) ;
333327 const isMainElementDemo = filename === 'index' ;
You can’t perform that action at this time.
0 commit comments