Skip to content

Commit

Permalink
Added a non-checkable action.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhop committed Dec 22, 2024
1 parent 2c54b7d commit 53143bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/filters/filter-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const regExpFilter = (regExp, separator) => {
};

const filterBase =
({defaultAction = 'ignore', specialAction = 'accept', transition} = {}) =>
({specialAction = 'accept', defaultAction = 'ignore', nonCheckableAction = 'ignore', transition} = {}) =>
options => {
const once = options?.once,
separator = options?.pathSeparator || '.';
Expand Down Expand Up @@ -166,7 +166,7 @@ const filterBase =
previousToken = chunk.name;

// check the token
const action = checkableTokens[chunk.name] === 1 && filter(stack, chunk) ? specialAction : defaultAction;
const action = checkableTokens[chunk.name] !== 1 ? nonCheckableAction : filter(stack, chunk) ? specialAction : defaultAction;

endToken = stopTokens[chunk.name] || '';
switch (action) {
Expand Down

0 comments on commit 53143bb

Please sign in to comment.