File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,10 @@ export class StateBuilder {
281
281
build ( state : StateObject ) : StateObject {
282
282
let { matcher, builders} = this ;
283
283
let parent = this . parentName ( state ) ;
284
- if ( parent && ! matcher . find ( parent ) ) return null ;
284
+
285
+ if ( parent && ! matcher . find ( parent , undefined , false ) ) {
286
+ return null ;
287
+ }
285
288
286
289
for ( let key in builders ) {
287
290
if ( ! builders . hasOwnProperty ( key ) ) continue ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export class StateMatcher {
13
13
}
14
14
15
15
16
- find ( stateOrName : StateOrName , base ?: StateOrName ) : StateObject {
16
+ find ( stateOrName : StateOrName , base ?: StateOrName , matchGlob = true ) : StateObject {
17
17
if ( ! stateOrName && stateOrName !== "" ) return undefined ;
18
18
let isStr = isString ( stateOrName ) ;
19
19
let name : string = isStr ? stateOrName : ( < any > stateOrName ) . name ;
@@ -23,7 +23,7 @@ export class StateMatcher {
23
23
24
24
if ( state && ( isStr || ( ! isStr && ( state === stateOrName || state . self === stateOrName ) ) ) ) {
25
25
return state ;
26
- } else if ( isStr ) {
26
+ } else if ( isStr && matchGlob ) {
27
27
let _states = values ( this . _states ) ;
28
28
let matches = _states . filter ( state =>
29
29
state . __stateObjectCache . nameGlob &&
You can’t perform that action at this time.
0 commit comments