File tree 2 files changed +4
-7
lines changed
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 {
130
130
131
131
const workspace = await getWorkspace ( host ) ;
132
132
const project = workspace . projects . get ( options . project ) ;
133
-
134
- let optPath = '' ;
135
133
if ( project && options . path === undefined ) {
136
- optPath = buildDefaultPath ( project ) ;
134
+ options . path = buildDefaultPath ( project ) ;
137
135
}
138
136
139
- const parsedPath = parseName ( optPath , options . name ) ;
137
+ const parsedPath = parseName ( options . path as string , options . name ) ;
140
138
options . name = parsedPath . name ;
141
139
options . path = parsedPath . path ;
142
140
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 {
186
186
187
187
const workspace = await getWorkspace ( host ) ;
188
188
const project = workspace . projects . get ( options . project ) ;
189
- let optPath = '' ;
190
189
if ( project && options . path === undefined ) {
191
- optPath = buildDefaultPath ( project ) ;
190
+ options . path = buildDefaultPath ( project ) ;
192
191
}
193
192
194
193
options . module = findRoutingModuleFromOptions ( host , options ) ;
195
194
196
- const parsedPath = parseName ( optPath , options . name ) ;
195
+ const parsedPath = parseName ( options . path as string , options . name ) ;
197
196
options . name = parsedPath . name ;
198
197
options . path = parsedPath . path ;
199
198
options . selector = options . selector ? options . selector : buildSelector ( options , project ?. prefix ?? 'app' ) ;
You can’t perform that action at this time.
0 commit comments