File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -190,13 +190,12 @@ const behaviorAvailable = <TArgs extends unknown[]>(
190190
191191const behaviorMatches = < TArgs extends unknown [ ] > ( actualArguments : TArgs ) => {
192192 return ( behavior : BehaviorEntry < TArgs > ) : boolean => {
193- // Check arity
194193 const expectedArguments = behavior . args
195- const { ignoreExtraArgs } = behavior
196- if ( expectedArguments . length !== actualArguments . length && ! ignoreExtraArgs )
194+ const arityMatches = expectedArguments . length === actualArguments . length
195+ if ( ! arityMatches && ! behavior . ignoreExtraArgs ) {
197196 return false
197+ }
198198
199- // Check arguments
200199 return expectedArguments . every ( ( expectedArgument , index ) => {
201200 return equals ( actualArguments [ index ] , expectedArgument )
202201 } )
You can’t perform that action at this time.
0 commit comments