Skip to content

Commit

Permalink
fix: shouldFilter operation
Browse files Browse the repository at this point in the history
  • Loading branch information
citrizon committed Dec 21, 2024
1 parent 92ca6b4 commit 76343da
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/crucifix.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ class CrucifixInternal {
const ancestorList = parent ? [ parent ].concat( ancestors ) : [];

// Perform a callback if possible
let crucifixNode;
let propmanager = null;
const call = this.callbackList[ node.type ] || this.callback;
if ( call ) {
let propmanager = null;
if ( parentProperty ) propmanager = new CrucifixNode(
parent,
parentProperty,
Expand Down Expand Up @@ -86,7 +85,7 @@ class CrucifixInternal {
if ( shouldFilter )
node[ property ] = node[ property ].flat( Infinity ).filter( e => e );
}
return crucifixNode?.shouldFilter;
return propmanager?.shouldFilter;
}
}

Expand Down

0 comments on commit 76343da

Please sign in to comment.