File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -130,13 +130,11 @@ export default function(options: ComponentOptions): Rule {
130130
131131 const workspace = await getWorkspace ( host ) ;
132132 const project = workspace . projects . get ( options . project ) ;
133-
134- let optPath = '' ;
135133 if ( project && options . path === undefined ) {
136- optPath = buildDefaultPath ( project ) ;
134+ options . path = buildDefaultPath ( project ) ;
137135 }
138136
139- const parsedPath = parseName ( optPath , options . name ) ;
137+ const parsedPath = parseName ( options . path as string , options . name ) ;
140138 options . name = parsedPath . name ;
141139 options . path = parsedPath . path ;
142140 options . selector = options . selector ? options . selector : buildSelector ( options , project ?. prefix ?? 'app' ) ;
Original file line number Diff line number Diff line change @@ -186,14 +186,13 @@ export default function(options: PageOptions): Rule {
186186
187187 const workspace = await getWorkspace ( host ) ;
188188 const project = workspace . projects . get ( options . project ) ;
189- let optPath = '' ;
190189 if ( project && options . path === undefined ) {
191- optPath = buildDefaultPath ( project ) ;
190+ options . path = buildDefaultPath ( project ) ;
192191 }
193192
194193 options . module = findRoutingModuleFromOptions ( host , options ) ;
195194
196- const parsedPath = parseName ( optPath , options . name ) ;
195+ const parsedPath = parseName ( options . path as string , options . name ) ;
197196 options . name = parsedPath . name ;
198197 options . path = parsedPath . path ;
199198 options . selector = options . selector ? options . selector : buildSelector ( options , project ?. prefix ?? 'app' ) ;
You can’t perform that action at this time.
0 commit comments