Skip to content

Commit

Permalink
Explicitly check for false as output from the filter function
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-tomlein committed Jul 11, 2024
1 parent b41556f commit b5f8daf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/tracker-core/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ export function trackerCore(configuration: CoreConfiguration = {}): TrackerCore
// Call the filter on plugins to determine if the event should be tracked
const skip = corePlugins.find((plugin) => {
try {
return plugin.filter && !plugin.filter(pb.build());
return plugin.filter && plugin.filter(pb.build()) === false;
} catch (ex) {
LOG.error('Plugin filter', ex);
return false;
Expand Down

0 comments on commit b5f8daf

Please sign in to comment.