Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engines hold filter duplicates #4266

Open
chrmod opened this issue Sep 11, 2024 · 0 comments
Open

Engines hold filter duplicates #4266

chrmod opened this issue Sep 11, 2024 · 0 comments
Assignees
Labels

Comments

@chrmod
Copy link
Member

chrmod commented Sep 11, 2024

While testing FiltersEngine.merge we've noticed that engines are able to keep duplicated filters.

Steps to reproduce:

const engineBlob = fs.readFileSync(pathToEngine);
const engine = FiltersEngine.deserialise(engineBlob); 
const emptyEngine = FiltersEngine.empty(engine.config);
const newEngine = FiltersEngine.merge([engine, emptyEngine]);
assert(engine.getFilters().networkFilters.length === newEngine.getFilters().networkFilters.length);
assert(engine.getFilters().cosmeticFilters.length === newEngine.getFilters().cosmeticFilters.length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants